Fallen Guardian Posted June 24, 2011 Share Posted June 24, 2011 So I'm using two scripts, one that checks if a global number has reached a certain point and one to assign that number. However, they both encounter problems while compiling. Here are the scripts: void main() { SetGlobalNumber(MERC_ASSIGN, 2); } int StartingConditional() { int i = GetGlobalNumber(MERC_ASSIGN); if (i == '2') { return true; } } What have I done wrong? Link to comment Share on other sites More sharing options...
TimBob12 Posted June 24, 2011 Share Posted June 24, 2011 Your first script should look like this void main() { SetGlobalNumber("MERC_ASSIGN", 2); } Second Script int StartingConditional() { int i = GetGlobalNumber("MERC_ASSIGN"); if (i == 2) { return TRUE; } else { return FALSE; } } Link to comment Share on other sites More sharing options...
Fallen Guardian Posted June 24, 2011 Author Share Posted June 24, 2011 Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.