Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

corrupt/broken scripts

Waffle Projects
Registered User
Join date: 9 Aug 2006
Posts: 38
11-17-2006 18:20
Sometimes after I make a modification to a script it simply stops working. Even if I comment out or remove the change and restore the script to its original working state, it still will not even work. it will not even do an llSay() on default state entry! but then, even more baffling, if I copy such a "broken" script and paste it into a new script, that new script will run just fine. is there any other way to "unbreak" a script, other than this clumsy workaround?
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
11-17-2006 18:26
From: Waffle Projects
Sometimes after I make a modification to a script it simply stops working. Even if I comment out or remove the change and restore the script to its original working state, it still will not even work. it will not even do an llSay() on default state entry! but then, even more baffling, if I copy such a "broken" script and paste it into a new script, that new script will run just fine. is there any other way to "unbreak" a script, other than this clumsy workaround?


Make sure you aren't editing the object the script is in. Sometimes that causes scripts to not run.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Trevor Langdon
Second Life Resident
Join date: 20 Oct 2004
Posts: 149
11-17-2006 22:33
Also, I have noticed that sometimes with compile errors a script will end up with the Running box unchecked.

Or you could have unchecked the box by accident while editing the script.
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
11-17-2006 22:57
And sometimes it is none of those things, the running check box just gets unchecked for a reason I have been unable to determine.

On the one hand, you get used to double-checking that the running checkbox is checked, on the other it's just another pain in the ... quirk that you have to live with in SL :)
HtF Visconti
Registered User
Join date: 21 Jul 2006
Posts: 123
11-20-2006 05:55
Big tip for days when SL is lousy: Don't script!

When I have high package loss in my sim or when it is generally very laggy I have started to stop trying to script alltogether. At times ages old code is still in the script although when you double click it you get ne new code in the source window. It is when you see about 300 lines of code but get a "Hello Avatar" when resetting it you just *know* when to stop :)

Most of the odd behaviour of scripts (listeners that didn't listen, llSays that didn't come, etc.) were due to SL problems. After a few hours or a day things normally returned to "normal".
Ralph Doctorow
Registered User
Join date: 16 Oct 2005
Posts: 560
11-20-2006 07:07
I'd also suggest doing your scripting off line and cutting and pasting into SL to do compiles and debugs. Once you get your code compiled correctly, copy it back to the off line editor, you really don't want your source to only exist in world.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
11-20-2006 08:56
I recommend using lslint, an offline LSL syntax checker.
http://w-hat.com/lslint/
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey