Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Dumb thing I did while trying to redo a script.

Damien1 Thorne
Registered User
Join date: 26 Aug 2007
Posts: 4,877
05-23-2009 20:43
I am very new to scripting as can be seen by previous threads.

One of my tenants came up with the idea of having a holodeck type skybox that she could build multiple scenes inside. I wrote a script to handle the basic stuff but i had to go modify the script and add a new section for each scene.

I decided to redo the script to make it notecard configurable and after doing the basic rewrite to create the new menus based on the notecards, i went to install and test the first stage. I pulled a copy of the original script in case something went totally wrong, I could reload the original until I found out what was wrong.

Anyway, every time i pulled up the menu I kept getting two dialog boxes, the new one and the old one. After spending several hours tearing the new script apart and retesting, I realized that the old script (that had a different name) was still running in the holodeck's inventory.

No real question, but I thought it might be useful to us new scripters and a laugh for you here that have been here awhile.
_____________________
As we fade into the darkness...
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
05-23-2009 22:09
"[x] Running" is your friend. Click your friend.
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Damien1 Thorne
Registered User
Join date: 26 Aug 2007
Posts: 4,877
05-23-2009 22:31
I thought I had removed the original while still keeping a copy. :p On of those argh things when you find it after so many hours of fighting strange things in a program.
_____________________
As we fade into the darkness...
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
05-24-2009 01:54
It's a good practice to put some sort of identifier in your scripts. In the state entry, drop an llSay (0,"my script 1.0";); in and it helps sometimes when you get off track like that. With something like that, you'd have caught your problem much sooner :)
_____________________
My tutes
http://www.youtube.com/johanlaurasia
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
05-24-2009 06:13
I have a holo script I give away, full perms. IM me ingame if you'd like a copy, either to use or to compare approaches. It includes a fairly sophisticated notecard reader.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
05-24-2009 08:55
include version and product strings in your script name or code and a simple report feature. I like
CODE

if (llDetectedKey( 0 ) == llGetCreator()) {
llWhisper( DEBUG_CHANNEL, llGetScriptName() );
}
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
05-24-2009 09:16
llOwnerSay() has been invented LOL (sorry I'm not that holy, but both llSay and now llWhisper are suggested in the thread and honestly: only the owner would be interested in that kind of information)
_____________________
From Studio Dora
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
05-24-2009 12:40
From: Dora Gustafson
honestly: only the owner would be interested in that kind of information)

you may have missed that mine was actually set to respond to the creator, not the ower, although a response to a keyphrase such as "getv" might be better, and the same debug output... useful for upgrade inventory gives too.

although I was sloppy, it should be
CODE

if (llDetectedOwner( 0 ) == llGetCreator()){
llWhisper( DEBUG_CHANNEL, llGetScriptName() );
}



why creator? because generally the user only wants to know 2 things... does what I have work, and if not is there a newer version that does?
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -