int GetInt(string intname)
Returns the value of a global non-array integer variable.
If the named int doesn't exist, will return 0.
It is recommended that you use this in conjunction with IntExists() so you can tell if it's a real 0 or a 'doesn't exist' 0.
int num = 7; GetInt( "num" ); // Gets the value of num (7). GetInt( "fake_num" ); // as fake_num isn't a defined int, returns 0. int real_zero = 0; GetInt( "real_zero" ); // also returns 0, but it's a real 0! real_zero = 1; GetInt( "real_zero" ); // now returns 1. Tricksy!
There are no talkbacks on this documentation page yet. Post the first?
Doc Nav |
Your docs |