|
Cro Sola
Registered User
Join date: 19 Jul 2006
Posts: 34
|
08-29-2006 05:02
im having a problem with this script, the command word is ment to be delete but when ever i type anything it deletes my object, could someone please tell me where the problem is default { state_entry() { llListen(0,"",llGetOwner(),""); }
listen(integer channel, string name, key id, string m) { if (m=="delete");llDie(); } }
|
|
Selador Cellardoor
Registered User
Join date: 16 Nov 2003
Posts: 3,082
|
08-29-2006 05:04
From: Cro Sola im having a problem with this script, the command word is ment to be delete but when ever i type anything it deletes my object, could someone please tell me where the problem is default { state_entry() { llListen(0,"",llGetOwner(),""); }
listen(integer channel, string name, key id, string m) { if (m=="delete");llDie(); } }
The problem seems to be the semi-colon after the if. The die command appears as a separate instruction and is always executed. Try replacing the first semi-colon with a space.
|
|
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
|
08-29-2006 05:06
From: Cro Sola default { state_entry() { llListen(0,"",llGetOwner(),""); }
listen(integer channel, string name, key id, string m) { if (m=="delete");llDie(); } }
the ; between if (m=="delete"  and llDie(); nullifies the if command. default { state_entry() { llListen(0,"",llGetOwner(),""); }
listen(integer channel, string name, key id, string m) { if (m=="delete") llDie(); } }
_____________________
www.nandnerd.info http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
|
|
Cro Sola
Registered User
Join date: 19 Jul 2006
Posts: 34
|
08-29-2006 05:21
awesome thanks guys
|