Difference between revisions of "Talk:Ceil"
Jump to navigation
Jump to search
imported>JOG (Duh...) |
imported>JOG (still problems...) |
||
Line 21: | Line 21: | ||
:: --[[User:JOG|JOG]] 09:35, 21 August 2006 (EDT): Uhm... Yes of course, forget this ;) | :: --[[User:JOG|JOG]] 09:35, 21 August 2006 (EDT): Uhm... Yes of course, forget this ;) | ||
[[User:JOG|JOG]] 14:18, 21 August 2006 (EDT): No, actually it still doesn't do what I want: | |||
set floatvar to 0.55 | |||
set shortvar to ceil 11 * floatvar - 5 | |||
returns 1 instead of 2 so it's most likely compiled to ''ceil(11)* floatvar - 5'' | |||
set floatvar to 0.55 | |||
set shortvar to ceil ( 11 * floatvar - 5 ) | |||
won't compile ("Missing parameter float"). This makes the function a bit useless for me, because I don't want to use a second dummy-float, just to set the ceiled variable into a short. I'd rather use: | |||
set floatvar to 0.55 | |||
set shortvar to 11 * floatvar - 4.01 |
Revision as of 13:18, 21 August 2006
seems like this function doesn't like parentheses and expressions that contain other functions.
set dummy to player.getav sneak set result to ceil dummy / 25
works fine
set result to ceil player.getav sneak / 25
returns "Unknown variable getav"
set result to ceil ( player.getav sneak / 25 )
returns "Missing parameter float"
--JOG 06:45, 21 August 2006 (EDT)
- afaik, all functions behave like that. It's not something specific to ceil.
- --Timeslip 08:13, 21 August 2006 (EDT)
- --JOG 09:35, 21 August 2006 (EDT): Uhm... Yes of course, forget this ;)
JOG 14:18, 21 August 2006 (EDT): No, actually it still doesn't do what I want:
set floatvar to 0.55 set shortvar to ceil 11 * floatvar - 5
returns 1 instead of 2 so it's most likely compiled to ceil(11)* floatvar - 5
set floatvar to 0.55 set shortvar to ceil ( 11 * floatvar - 5 )
won't compile ("Missing parameter float"). This makes the function a bit useless for me, because I don't want to use a second dummy-float, just to set the ceiled variable into a short. I'd rather use:
set floatvar to 0.55 set shortvar to 11 * floatvar - 4.01