Jump to content

What's wrong with this script?


KennyChidorie
 Share

You are about to reply to a thread that has been inactive for 1670 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Several things, in fact.  

the variable named ownerName is defined in two places as a local variable with

        string ownerName = llKey2Name(ownerKey);
but it really should be global.  To make matters worse, the second time it is defined (in the listen event) , it is actually defined as 

        key ownername = llKey2Name(ownerKey);
which is clearly a type error.  That will cause a syntax error in the llInstantMessage line that follows it a few lines later. 

Then there's the line that says

            llRemoveInventory("otherscripthere..");
which will fail if there is no script named "otherscripthere.." in the object's inventory.  Then there are the lines that have been commented out, including the llRequestPermissions statement.  That's not truly an error, because technically you do not need permission to detach an object that you are wearing.  Still, it's good form to keep it.  When you do, though, you should include a test to see whether PERMISSION_ATTACH has been granted.  This script does not.

All in all, it's not a very well tested script.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1670 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...