Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

attach/detect script. What am I doing wrong?

Eiji Mayo
Registered User
Join date: 5 Jun 2007
Posts: 79
07-13-2007 00:43
Hi.. I am having trouble scripting something for a friend. It's a HUD attachment that, when you type one command (example: /10 armor on) it attaches the piece of the outfit to you, and when you type another (example: /10 armor off) it detaches the pieces and attaches your default outfit. (good for roleplayers, btw)... I have state entry set to llListen for commands. and in listen(...) I put "integer perm = llGetPermissions( );" and after that I put the "if( command == "..." ), andwithin that I put the if(perm & PERMISSION_ATTACH ) routine. inside that routine I put llAttachToAvatar( llGetOwner(), ATTACH_NOSE );

this works fine in the LSLEditor, but when I try to use it in Second Life's script editor I get this error: [error; function call mismatches type or number of arguments]

What is this about? Sorry if you can't work out what I typed... Alittle irritated, because I want to get this done for my friend to use.
Simnelia Petrichor
Registered User
Join date: 10 Feb 2006
Posts: 35
07-13-2007 01:13
I can't explain why it works in the LSL editor, but it should just be llAttachToAvatar(ATTACH_NOSE).

It attaches to whoever it has attach permissions on.