You must be logged in to do that.

GetInt

GetInt
int GetInt(string intname)

Documentation

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.

Example Usage

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!
Talkback

There are no talkbacks on this documentation page yet. Post the first?

Post a new comment?

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.