Wandering Soulstar Posted September 24, 2018 Share Posted September 24, 2018 Hi All, Another strange one that perhaps someone has come across or can explain. Let me set the scenario and then what is happening: I have a set of scripts I use when building, there are a total of three, plus a control script, in each prim while I build. These are controlled via a HUD that I built, at its simplest just telling the prims which script should be active. I have been using this to build for a number of years now, and while not bullet proof for sales on the market place, it does the job and has been very stable. Came in-world just a bit ago and was back to a large house build I am working on for the first time in a couple week. Went to the last section I was working on and set to work. When I set to have a particular worker script enabled, I got flooded with error messages that the script was missing, yet on inspection could see that the script was there, what is more my code checks to see if the file is there before trying to enable it through an Inventory check. I confirmed this by resetting the control script in one prim, this automatically on start call to set every script in inventory to not running with the following code: set_scripts(integer active) { //Stop any running scripts integer num = llGetInventoryNumber(INVENTORY_SCRIPT); string name; integer x; string myName = llGetScriptName(); for (x = 0; x < num; x++) { //If it is not me turn it off name = llGetInventoryName(INVENTORY_SCRIPT, x); if (name != myName) { llSetScriptState(name, active); } } } .. and .. yes you guessed it .. debug/errors for each script name (that was read from Inventory) saying that it was not found. I have found some work arounds to fix, but considering the size of my build these are not really helpful, unless there is no other way: Edit the script, set to running, non-mod the code so that the save button is enabled, save, and will work fine from then on Take into inventory and re-rez, again works fine from then on The first is untenable with some 750 prims atm and two scripts per, I'd be at it for the next two weeks. The second difficult as well. The build is not linked, and still in work. Would easily miss prims here or there and would have a mess to get it back in place. So my hope is that this sounds familiar to someone and they have a magical answer for me ... Please? Thanks in advance! Wanda Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted September 24, 2018 Share Posted September 24, 2018 The first thing you tried is called recompiling. (Saving the script compiles it.) What you can do to do the same to all unlinked objects is select them all (I know, same problem as with taking into inventory), and going to Build > Scripts > Recompile (MONO) That will do the process for you for all scripts in each selected prim. Link to comment Share on other sites More sharing options...
Wandering Soulstar Posted September 24, 2018 Author Share Posted September 24, 2018 Thanks Wulfie ... works like a charm. Long wait, but much easier, and missing a few here or there is not as critical as the ouliers will be found when I go to use them. Still be nice to know why this suddenly happened. Link to comment Share on other sites More sharing options...
Rolig Loon Posted September 24, 2018 Share Posted September 24, 2018 1 hour ago, Wandering Soulstar said: Still be nice to know why this suddenly happened. I'm occasionally left with the same question. I don't often need to change script state, so I don't run into your particular problem, but I do find that some scripts mysteriously stop responding "correctly" -- whatever "correctly" is. They don't respond properly to a collision, or they don't detect someone who is clearly in range, or whatever. Resetting the errant script almost always fixes it, but that leaves me wondering why it screwed up in the first place. The convenient answer is that the servers have been having a migraine, but that's like a medieval doctor saying that I have a demon -- it's not a real answer. I don't like adding a utility script that simply restarts all other scripts once a day, because that's only curing a symptom rather than dealing with the underlying issue. Still, sometimes that's all I can do. Fortunately, most scripts behave most of the time. 1 Link to comment Share on other sites More sharing options...
Wandering Soulstar Posted September 25, 2018 Author Share Posted September 25, 2018 The strange thing is that this was such a massive failure. 1500 scripts all wonkered, but another 1500 working fine. The constant was that the scripts whose state was False (not running) were the ones that broke, and the those whose state had been running were fine. Link to comment Share on other sites More sharing options...
Wandering Soulstar Posted September 25, 2018 Author Share Posted September 25, 2018 And to make matters worse, there is no way I can code against this happening. The fix provided by Wulfie, re-compiling, cannot be done from within. To be able to reset another script, using llResetOtherScript, the other script needs to be running. In ant case I'd imagine that the same problem would occur, i.e. while the inventory tells me the script is there, the system does not recognise it as a script. Link to comment Share on other sites More sharing options...
Recommended Posts
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