Page 1 of 1

Quick question

Posted: Fri Nov 13, 2009 4:16 am
by GMer
I get a "parse error" near the "NewOrder" command in the "Spawn" Order, can anyone point out my error? (second script I made tonight, the 1st one with no help whatsoever :D )

Code: Select all

{


ATTRIBNAME	["drophealth"]
ATTRIBAMNT	[100]
ENTITY		["playerdrop"]

	Spawn[()
	{
		Console(true);
		NewOrder("Check");
	}]

	Check[()
	{
		if(self.player_range<64)
		{
		ModifyAttribute(ATTRIBNAME,ATTRIBAMNT,ENTITY) // this interacts with my other script, it can be ignored
		NewOrder("Death")
		}
		else
		{
		RestartOrder()
		}
	}]

	Death[()
	{
		Remove(true);
	}]
}
Thank you.

Re: Quick question

Posted: Fri Nov 13, 2009 7:28 am
by Allanon
Missing semicolons:

Code: Select all

Check[()
   {
      if(self.player_range<64)
      {
          ModifyAttribute(ATTRIBNAME,ATTRIBAMNT,ENTITY); // this interacts with my other script, it can be ignored
          NewOrder("Death");
      }
      else
      {
          RestartOrder();
      }
   }]