Jump to content

Home

Global Number Trouble


Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...