Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

"couldn't find script: [scriptname]"

Nimbus Rau
Salmon pie? Where?
Join date: 15 Apr 2007
Posts: 292
02-22-2008 22:52
There's probably a simple solution for this one, but I haven't the foggiest idea what it would be, and so I'm asking all you wise folk. :-)

The situation is this: I'm building an avatar which has doubled hind feet - one section is visible when not flying and becomes invisible in flight; the other section is visible when flying and becomes invisible when not flying. The nett effect is that the foot section appears to move position between animation states. So far so good. It gets more complicated when I try to add in HUD-operated claws that appear and disappear according to a button-press. What I'm trying to achieve is for the two sets of claws to detect the animation state and to simply vanish when the rest of the foot section vanishes, but to listen for the claws/no-claws command from the HUD and react accordingly when the rest of the foot section is visible. With me so far?

The method I have used to achieve this is to have two scripts in each claw. One of them, "claws in/out", listens for the HUD command and makes the claws visible/invisible accordingly. The other, "flight detection", uses llGetAgentInfo and llSetTimerEvent to detect animation state and then if it detects the avatar in flight/not in flight (depending on which foot section it is part of), it switches off the "claws in/out" script then makes the claws invisible.

It's convoluted to describe, but it works beautifully. The claws all appear and disappear exactly when they should regardless of animation state. But there's one little problem. When I teleport, I get an error message from each claw that says: "Object: Couldn't find script claws in/out". It vanishes after a second or two and doesn't recur until I teleport again. The claws continue doing what they should do. The only problem seems to be that annoying error message.

Does anyone know of a way to either prevent the error causing this? (I'm guessing maybe it's a lag issue with the first script not detecting the second script for a moment, until it loads after tp...?) Or perhaps someone maybe knows of a way to make the error occur silently, with no message. Since the claws seem to work perfectly apart from this msg, simply silencing the message would do just fine.

Any suggestions, folks?
_____________________
- Metamorphoses - Quad Cat Avatars & More
http://slurl.com/secondlife/Firespire/46/203/21/
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
02-23-2008 00:29
that's a new error on me, but I can imagine there's a way to simplfy your design.... keep you in/out script, but move the code for the blocking into the hud button... if it's off (claws in) then test the av state before sending the out message... if they're out (on) then periodically test if the avatar is flying... if it is, send to the msg for claws in and change button states... it has the added bonus of requing less scripts, you also don't have to poll the av state unless the claws are out.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Nimbus Rau
Salmon pie? Where?
Join date: 15 Apr 2007
Posts: 292
02-24-2008 17:32
Thanks for that suggestion, Void! After a fair bit of mucking around trying different variations on your theme, I've finally found one that *seems* to work, more or less. It's not quite as graceful as the original setup regarding coping with claw changes in flight, but it seems to have fixed the annoying error message problem, so I'm gonna go with that for now. :-)
_____________________
- Metamorphoses - Quad Cat Avatars & More
http://slurl.com/secondlife/Firespire/46/203/21/
Haruki Watanabe
llSLCrash(void);
Join date: 28 Mar 2007
Posts: 434
02-25-2008 00:49
I had some problems with scripts not being found as well. Try to rename the script as it seems that sometimes LSL has probs with names with slashes in it... So, name it «claws_in_out» rather than «claws in/out»...
Nimbus Rau
Salmon pie? Where?
Join date: 15 Apr 2007
Posts: 292
02-25-2008 00:51
Oh, what an interesting thought! Ok, I'll try that. Thanks!
_____________________
- Metamorphoses - Quad Cat Avatars & More
http://slurl.com/secondlife/Firespire/46/203/21/
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
02-25-2008 04:21
I saw that on a mono sim... rez an object with two scripts in, one mono, one lsl and have the lsl one set the mono one to running.

You get exactly that message when you rez the object the first time.
rez any further copies and no problem.

derez any copies, wait a couple hours....

repeat the above.
You will get that error again.

So to me this looks like one of your scripts is trying to activate the other script on rez or trying to reset the other script while it is still being fetched by the sim.
Sho Iuga
Registered User
Join date: 6 Jun 2007
Posts: 35
02-25-2008 06:17
If your claws and legs dont do more then show/hide, then you dont even need a script in the claws.
You could use the llSetLinkAlpha function to show/hide the appripriate prims.

You would only need one script (and therefore only one listener) that listens to your HUD for the show/hide claws command and polls the flying state. If flying or claws change it makes the appropriate prims in the linkset visible/invisible.

Its not an option though if the scripts in your claws and legs do more complicated things. (But even then you need only one listener and relay the commands to the appropriate prims via llMessageLinked).
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
02-25-2008 08:39
I'll second the relayed message bit. but I'll also guess that this prim av set is +mod so I wouldn't go the set link direction.... else the user could seriously break the item in the process of modifying it, and who wants the headache or fielding questions over link order to end users?

(or the more likely scenario is they tell you it's broken, and 30 mins into troubleshooting it the mention "oh yeah relinked it all because I wanted an extra toe" or some other strange modification, where they linked your object to theirs as the rott, thus changing the entire order of your primset and destroying the usefulness of the link* calls)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -