Difference between revisions of "Globals"
Remove from glossary
imported>Big Brother (→Notes:: I discovered ( via a nast bug ) that globals will always act as floats ( within scripts, at least ). I ran a seperate experiment to verify the claims made in the edit.) |
imported>Wrye (Remove from glossary) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 16: | Line 16: | ||
* It seems that, when used in scripts, global variables always act as floats regardless of what you declare them as. This could cause issues in situations such as: | * It seems that, when used in scripts, global variables always act as floats regardless of what you declare them as. This could cause issues in situations such as: | ||
set giCoinToss to GetRandomPercent / 50 ; | set giCoinToss to GetRandomPercent / 50 ;giCoinToss is a global short | ||
if( | if( giCoinToss == 1 ) | ||
;do result for heads | ;do result for heads | ||
else | else | ||
Line 35: | Line 35: | ||
[[Category:Scripting]] | [[Category:Scripting]] | ||
[[Category:Variables]] | [[Category:Variables]] | ||