Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Global Number Trouble

Page: 1 of 1
 Fallen Guardian
06-24-2011, 4:22 PM
#1
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?
 TimBob12
06-24-2011, 4:56 PM
#2
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;
}
}
 Fallen Guardian
06-24-2011, 5:44 PM
#3
Thanks.
Page: 1 of 1