Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

syntax error---unexpected state

Bilbo Goodliffe
all around good guy
Join date: 30 Dec 2005
Posts: 22
03-06-2007 16:32
CODE


state auto {
state_entry()
{
vector position = llGetPos();
currentAltitude = position.z - llGround(<0,0,0>);
If ( currentAltitude <= 200 )
state on;
}
}



not sure why i am getting this help, comes at the "state on" line

thanks
Lotus Excelsior
Registered User
Join date: 6 Nov 2006
Posts: 4
03-06-2007 16:59
Probably the capital I in If. The parser thinks it is a function rather than an 'if'
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
03-06-2007 23:10
You must have a default state. if that's the whole of the script, then it's surprised to see a state other than default at the top.
_____________________
Bilbo Goodliffe
all around good guy
Join date: 30 Dec 2005
Posts: 22
thanks
03-07-2007 03:50
lol i guess that's what i get for scripting at 5am local

thanks

Bilbo