Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Problem with script just failing

Ving Xi
Registered User
Join date: 23 Sep 2006
Posts: 9
10-27-2006 18:17
I have written a script, using states, to display dialogs in order to choose an object to rez. The script works most of the time, but will frequently (after working properly once) refuse to run again (via touch_start).

Is this most likely a problem with my programming, or a problem with the system? I have read and read and READ and can't find any reference to this.

I am trained in programming in real life and I feel I have respected all the restrictions and so forth of the language. How can a program work one time and not another, without me having modified it.

I am at my wit's end at this point, and turn to wiser heads for an answer.

Ving Xi
Vares Solvang
It's all Relative
Join date: 26 Jan 2005
Posts: 2,235
10-27-2006 18:43
My guess is that it is getting stuck in one of the states. Make sure that each of the other states send the script back to the default state when they are done with their bit. (I have found it's really easy to miss this.)

Other than that I don't have any other guesses without seeing the script.
_____________________
ed44 Gupte
Explorer (Retired)
Join date: 7 Oct 2005
Posts: 638
10-27-2006 19:27
llOwnerSay is your firend. Use it before you enter any loops or any conditions that might lock up your script. I use a global variable, gdebug = FALSE or TRUE to disable/enable all my if (gdebug) llOwnerSay . . . statements. The last one would point to your problem.

My last problem was thinking that setting the timer took a milisecond argument rather than a seconds argument.
Ving Xi
Registered User
Join date: 23 Sep 2006
Posts: 9
10-28-2006 07:05
I ended up merely slowing down on my testing and was able to successfully complete my project. If I clicked on the menus very quickly it would fail (probably think I was some kind of malware or something), but if I took my time like a normal person, it never failed.

Thank you for all your help!

Ving Xi
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
10-28-2006 11:24
From: Ving Xi
I ended up merely slowing down on my testing and was able to successfully complete my project. If I clicked on the menus very quickly it would fail (probably think I was some kind of malware or something), but if I took my time like a normal person, it never failed.


I had something very much like this with a multi-state dialog system I wrote recently. The problem turned out to be that I was calling llDialog() BEFORE I called llListen(), and it was giving the user (me) just enough time to quickly press a button before the listener got set up. My script wouldn't receive the listen event for the button-press, and the script would get stuck in that state waiting forever for a response. Is that what's going on with your script?