Difference between revisions of "Category talk:Variables"
Jump to navigation
Jump to search
m
→Overhaul: Fixed link
imported>Haama (→Overhaul: They aren't truncated) |
imported>Haama m (→Overhaul: Fixed link) |
||
Line 23: | Line 23: | ||
#*This one has a problem, though, as a [[Globals|global]] long is not the same as a scripted [[Long|long]].--[[User:Haama|Haama]] 15:28, 25 March 2008 (EDT) | #*This one has a problem, though, as a [[Globals|global]] long is not the same as a scripted [[Long|long]].--[[User:Haama|Haama]] 15:28, 25 March 2008 (EDT) | ||
:"...a global long is not the same as a scripted long" - How so? In my experience '''''all''''' variables are stored as floats, not just globals. Shorts ''aren't'' restricted to the +/-32k range you'd expect from a signed int16. Longs ''do'' have precision issues that you wouldn't expect from an int32. This is why personally I've dropped both of them, and simply use "int" now. --[[User:Speedo|Speedo]] 15:45, 25 March 2008 (EDT) | :"...a global long is not the same as a scripted long" - How so? In my experience '''''all''''' variables are stored as floats, not just globals. Shorts ''aren't'' restricted to the +/-32k range you'd expect from a signed int16. Longs ''do'' have precision issues that you wouldn't expect from an int32. This is why personally I've dropped both of them, and simply use "int" now. --[[User:Speedo|Speedo]] 15:45, 25 March 2008 (EDT) | ||
::See the notes on the [[Globals]] page - essentially the number returned will never be truncated as with script variables. A good example would be the [[Special Variable]] GameHour.--[[User:Haama|Haama]] 16:10, 25 March 2008 (EDT) | ::See the notes on the [[Globals]] page - essentially the number returned will never be truncated as with script variables. A good example would be the [[Special variables|Special Variable]] GameHour.--[[User:Haama|Haama]] 16:10, 25 March 2008 (EDT) |