Script loads but does not run
|
|
Jayaram Constantine
Registered User
Join date: 29 Jul 2008
Posts: 4
|
10-16-2008 11:35
Hi,
I created a script using LSL plus a free LSL development environment. The tool lets you enter an extended form of LSL and then it generates a normal LSL script file. Normal in the sense that the extensions are removed.
When i copy the non extended form into my object running in world the code compiles but the events, including the default state events which i have added output messages to, do not get called.
I originally thought that it might be a bug in LSL plus so I stopped using it. However, I have recently had the same thing happen in a script that i built using the client script editor. The solution in both the LSL Plus and the script editor case was to delete the script and then start over entering the exact same code.
Has anyone else seen this behavior? I have looked at the text in another editor that allows a binary view and don't see any odd control codes.
|
|
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
|
10-16-2008 12:14
Make sure you're in land where running scripts is allowed. There's a little icon at the top of your screen that appears if it isn't. (Hover your cursor over the icons there to see what each one means.)
Most likely, you're in "no-script" land.
|
|
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
|
10-16-2008 12:35
I've noticed lately that at least some script errors will make the script silently stop running, like I think they made it stop spitting out exception info. For example, overflowing an integer. It just silently stops running. If you compile for "LSL" instead of "Mono" does it act the same?
|
|
Jayaram Constantine
Registered User
Join date: 29 Jul 2008
Posts: 4
|
10-16-2008 12:51
No I have not tried compiling in mono. I am using the release client trying to get something working for production.
And, yes I am running on script enabled land.
|
|
Ron Khondji
Entirely unlike.
Join date: 6 Jan 2007
Posts: 224
|
10-16-2008 13:16
Mono compiled scripts run just as well on old viewers. From the wiki: Mono requires the 1.21 viewer to create Mono scripts. Note that no special viewer is required to run Mono scripts -- that is automatic and handled by the server.
Anyway. Just a stupid thing i've done myself once or twice. Did you remenber to click the 'Running' box.
|
|
Jayaram Constantine
Registered User
Join date: 29 Jul 2008
Posts: 4
|
10-16-2008 14:05
"Anyway. Just a stupid thing i've done myself once or twice. Did you remenber to click the 'Running' box."
Uh ok. That *did* make it work. But now i'm confused. What is the point of having to explicitly set the script to 'running'? Also, the setting seems to imply 'allow to run' as it looks like it persists between unloads and reloads of the object.
Thanks for pointing me in the right direction.
|
|
Ron Khondji
Entirely unlike.
Join date: 6 Jan 2007
Posts: 224
|
10-16-2008 14:47
Setting a script to not running makes it possible to put a bunch of them together in a box which you can then transfer to somebody else for instance.
I'm sure there are more benefits of being able to shut a script off but I can't think of any right now.
|
|
Pedro McMillan
SLOODLE Developer
Join date: 28 Jul 2007
Posts: 231
|
10-16-2008 14:55
One of the big benefits of the "Running" setting is where a syntactically correct script has a logic or run-time error. The minor difficulties like trying to give out non-existent inventory aren't serious, but there's some errors (such as stack/heap collision) where you really want the script shut down until you fix the problem.
|
|
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
|
10-16-2008 15:30
And I use it in objects that have a lot of Scripts. A controller runs full time and starts and stops slave scripts as needed to reduce lag.
|
|
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
|
10-16-2008 16:36
By default, the Running box is checked. However, it can get unchecked if you're editing a script in an object and you save the script and close the window and it had compile errors. Next time you open it, you'll see the running box unchecked.
|
|
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
|
10-16-2008 16:39
From: Day Oh I've noticed lately that at least some script errors will make the script silently stop running, like I think they made it stop spitting out exception info. For example, overflowing an integer. It just silently stops running. If you compile for "LSL" instead of "Mono" does it act the same? Overflowing an integer causes a fault? Overflowing how -- by addition, for example? Eep!
|
|
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
|
10-16-2008 18:57
From: Lear Cale Overflowing an integer causes a fault? Overflowing how -- by addition, for example? Eep! Dangit, I've been confused... Unless I can come back with an example, I take that back Sorry 
|
|
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
|
10-17-2008 08:12
Hey, this stuff is all so simple, a moron could do it. You must not be a moron, that's all. 
|
|
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
|
10-18-2008 08:35
What development environment tool were you using? I'm interested in extending LSLs.
|