Quick question

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
GMer
Posts: 329
Joined: Thu Oct 25, 2007 4:49 pm
Location: On the rock in the 3rd solar orbit.

Quick question

Post by GMer » Fri Nov 13, 2009 4:16 am

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.
Over 3 years (has it been that long?) and just now I noticed the day and month of my birthday were switched. Whoops!

Some 2d games I made, haven't made anything in a year though O.o
http://www.yoyogames.com/users/GMer56

Allanon
Posts: 493
Joined: Mon Aug 29, 2005 8:23 am

Re: Quick question

Post by Allanon » Fri Nov 13, 2009 7:28 am

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();
      }
   }]

Post Reply