Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

issue with hide/show script

Cheewha Palen
Registered User
Join date: 27 Nov 2007
Posts: 78
07-17-2008 08:33
Hello,

I am using this hide/ show script I pulled from the library. The toggle script works fine and the show hide script itself works fine but here is the issue I am having. When I put the show/hide script in a prim and log out sometimes when i log back in the script is gone from the prim, the toggle script is still there.

AND when I make a copy of the prim that has the show/hide script whether I drag a copy of it in world or whether I take a copy into inventory again the script disappears.

I have absolutely no explanation for this. Its like SL just hates this script. Here is the show hide script i am using. Please let me know if you are having similar issues or maybe even can think of a fix.

Show-hide
CODE

init()
{
llListen(69, "", "", "");
llSetAlpha(1, ALL_SIDES);
}
appear()
{
llSetAlpha(1, ALL_SIDES);
}
disappear()
{
llSetAlpha(0, ALL_SIDES);
}


default
{
state_entry()
{
init();
}
on_rez(integer start_param)
{
init();
}
attach(key attached)
{
init();
}
listen(integer chan, string name, key id, string msg)
{
if(llGetOwnerKey(id) == llGetOwner())
{
if(llToLower(msg) == "on" || llToLower(msg) == "both on")
{
disappear();
}
if(llToLower(msg) == "off")
{
appear();
}
}
}
}


*****************************************************************and here is the toggle script

CODE




integer on = 1;

default {
touch_start(integer n) {
if(on)
llSay(69, "on");
else
llSay(69, "off");
on = !on;
}
}


Good luck!
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
07-17-2008 09:21
There doesn't seem to be anything in the script that would cause the script to disappear like that, maybe that particular script is borked in the database. Try copying the contents of the script (control + A) then delete that script, create a new one, and paste the data into the new one (control + A, then control + V), then save out the new script.


http://www.secondscripter.com
_____________________
My tutes
http://www.youtube.com/johanlaurasia
Cheewha Palen
Registered User
Join date: 27 Nov 2007
Posts: 78
07-18-2008 13:47
Johan TY!

I tried this last night and it worked, for what ever reason the data base needed some hammering...lol

Thanks a LOT!!