Page 2 of 2

Re: Special Hud thing

Posted: Wed Oct 07, 2009 11:27 pm
by Jay
It says it found an error in line 12 of the 'Spawn' order, but that's bogus, becaue in neither script posted here the 'Spawn' order has 12 lines. Did you modify the script further on?

I just tested the script, made a few adjustments, and it ran just fine...
The final script:

Code: Select all

{
	INCREASETIMER	[0]
	TIMERAMOUT   [1.0] 
	Spawn[ ()
	{
		Console(true);
		LowLevel("Keycheck");
	} ]

	Keycheck[ ()
	{
		if(INCREASETIMER < self.time)
		{
			if (IsKeyDown(46))
			{
				ModifyAttribute("speed", 5,"Player");
			}
			else
			{
				ModifyAttribute("speed", -5,"Player");
			}
			INCREASETIMER = self.time + StringCopy(TIMERAMOUT);
		}
		debug(GetAttribute("speed", "Player"));
	} ]
}

Re: Special Hud thing

Posted: Thu Oct 08, 2009 3:59 am
by GMer
Ah ha! I know what I did wrong!
I forgot to define a variable :P
Thanks Jay!