Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

LSL Bug since V .10

grumble Loudon
A Little bit a lion
Join date: 30 Nov 2005
Posts: 612
06-21-2006 17:34
Since The big release this code stoped working and I had to comment out the lines checking the owner of the object.

I've tryed variations and also had to change the code in my security system.



CODE

//Kills the object on command
// Released into the public domain by Grumble Loudon and LaserFur Leonov

integer m_channel = 25626;
//***************************************************************************
integer m_RezNumber = 0;
default
{
state_entry()
{
llListen(m_channel,"Land_Filler",NULL_KEY,"");
}//start
//***************************************************************************************
on_rez(integer StartPram)
{
m_RezNumber = StartPram; //starts at 1
}//on rez
//***************************************************************************************
listen(integer channel,string name, key id, string msg)
{
// if (llGetOwnerKey(id) == llGetOwner()) //prevent hack
// {
//msg will be a number of how many to kill
if ((integer)msg >= m_RezNumber) //numbers start at 1
{
llDie();
};
// };
}//Listen
//***************************************************************************************
}

Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
06-21-2006 17:53
Mhmm just tested, but it did work fine for me...
CODE

// sender
default
{
touch_start(integer total_number) { llSay(0, "rabble rabbler rabble"); }
}

// receiver
integer listen_handle = 0;

default
{
state_entry()
{
listen_handle = llListen( 0, "", NULL_KEY, "" );
}

listen( integer Channel, string Name, key Key, string Message ) {

if( llGetOwnerKey( Key ) == llGetOwner() ) { llSay( 0, "Mine! MinE! MIne! MiNe!" );}
}
}
grumble Loudon
A Little bit a lion
Join date: 30 Nov 2005
Posts: 612
06-21-2006 18:54
I'll do more testing, but maybe it has to do with me not being in the sim.
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
06-21-2006 20:06
From: grumble Loudon

CODE

llDie();
};
// };
}//Listen


Is this alright?
_____________________
:) Seagel Neville :)
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
06-21-2006 21:47
From: grumble Loudon
I'll do more testing, but maybe it has to do with me not being in the sim.

That shouldn't affect it. However, if the object that has the UUID you're passing to llGetOwnerKey is not in the same sim as the caller, then it will return NULL_KEY. (last I tested)

Are you getting a compiler error or is something not excuting properly?
==Chris
grumble Loudon
A Little bit a lion
Join date: 30 Nov 2005
Posts: 612
06-22-2006 05:41
I have a feeling that they fixed it with one of the recent updates.

The script would compile fine, but the owner test would fail.

I have to retest my original situation and see if it fails again.

Thanks
Sera Rawley
Registered User
Join date: 7 Apr 2006
Posts: 9
06-22-2006 17:19
From: grumble Loudon
The script would compile fine, but the owner test would fail.


I had problems with this recently. I was in the sim(although that shouldn't be a factor) and comparing the owner of the object speaking to the owner of the object listening would fail.