|
raven Blair
Registered User
Join date: 2 Feb 2004
Posts: 39
|
09-21-2007 21:33
I am getting a Syntax Error at the Timer event and i dont know why. Anyone able to help me out here key owner;
default { state_entry() { owner = llGetOwner(); llListen(0,"",owner,"HS"); llListen(0,"",owner,"sit"); llListen(0,"",owner,"stand"); llRequestPermissions(llGetOwner(),PERMISSION_TRIGGER_ANIMATION); } attach(key id) { llRequestPermissions(llGetOwner(),PERMISSION_TRIGGER_ANIMATION); }
listen(integer channel, string name, key id, string m) { if (m == "HS") { llMoveToTarget(llGetPos() + <0,0,0.3>,0.2); llSetTimerEvent(5); llStartAnimation(" U A Hand Stand p4"); } if (m == "sit") { llMoveToTarget(llGetPos() + <0,0,0.3>,0.2); llSetTimerEvent(5); llStartAnimation("doggy sit-short"); } if (m == "stand") { llStopMoveToTarget(); llStopAnimation("doggy sit-short"); } timer() { llSetTimerEvent(0); llStopMoveToTarget(); llStopAnimation("U A Hand Stand p4"); } } }
|
|
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
|
09-21-2007 21:44
You're missing a closing curly brace on the final "if" in the listen event handler, and you have one extra closing curly brace at the end of the timer event handler.
BTW, the second and third "if"s in listen should be "else if"s, since only one of those conditions can be true, at most.
|
|
raven Blair
Registered User
Join date: 2 Feb 2004
Posts: 39
|
09-21-2007 21:49
OMG I SO LOVE YOU,,,,,, i cant beleave i forgot that (faceplantkeyboard) thank you so much. From: Deanna Trollop You're missing a closing curly brace on the final "if" in the listen event handler, and you have one extra closing curly brace at the end of the timer event handler.
BTW, the second and third "if"s in listen should be "else if"s, since m can only possibly meet one of those conditions, at most.
|