Scripts Reset
- Marstol Nitely
- Posts: 486
- Joined: Mon Dec 24, 2012 1:42 am
- Has thanked: 1022 times
- Been thanked: 441 times
Scripts Reset
Just finished loading 8 variations of scripted items. When I tested delivery, the scripts seemed to have been reset, effectively erasing the information stored in one of the scripts. Any idea about how to fix this would be much appreciated.
- Sherrie Melody
- Posts: 273
- Joined: Fri Mar 29, 2013 6:56 pm
- Has thanked: 201 times
- Been thanked: 159 times
Re: Scripts Reset
It's hard to say without knowing more about the scripts, such as where did the information that was lost come from in the beginning, was it something calculated when you first rezzed it, or something you chatted to the script when setting it up?
If information that is generated after a script starts running must be persisted, you will need to store it in a permanent way, such as by creating a notecard or another script in the object inventory, or by storing the information in the object name or description, if the information is something that you can fit there and is not "secret".
If information that is generated after a script starts running must be persisted, you will need to store it in a permanent way, such as by creating a notecard or another script in the object inventory, or by storing the information in the object name or description, if the information is something that you can fit there and is not "secret".
- Marstol Nitely
- Posts: 486
- Joined: Mon Dec 24, 2012 1:42 am
- Has thanked: 1022 times
- Been thanked: 441 times
Re: Scripts Reset
Hi Sherrie,
The information is from a prim animator script and is stored in another script inside the prim. The scripts hold up fine in my inventory. I have rezzed them several times after signing off and on when making modifications. I have also given the item to another person on a different world and the scripts still work when that person rezzes the item. The problem only occurs after the item is uploaded to Kitely Marketplace.
The information is from a prim animator script and is stored in another script inside the prim. The scripts hold up fine in my inventory. I have rezzed them several times after signing off and on when making modifications. I have also given the item to another person on a different world and the scripts still work when that person rezzes the item. The problem only occurs after the item is uploaded to Kitely Marketplace.
- Sherrie Melody
- Posts: 273
- Joined: Fri Mar 29, 2013 6:56 pm
- Has thanked: 201 times
- Been thanked: 159 times
Re: Scripts Reset
I wonder if the marketplace resets the script after reading it to check for errors. We need Ilan or Oren to chime in here.
Still, to me it is odd to have data that is critical to the base object operation stored in such a way that it can be lost on script reset. Are your scripts based on Ferd Frederix's prim animation scripts?
Still, to me it is odd to have data that is critical to the base object operation stored in such a way that it can be lost on script reset. Are your scripts based on Ferd Frederix's prim animation scripts?
- Marstol Nitely
- Posts: 486
- Joined: Mon Dec 24, 2012 1:42 am
- Has thanked: 1022 times
- Been thanked: 441 times
Re: Scripts Reset
Yes, Sherrie, the script is Ferd Frederix's latest animation script. It and the other open source scripts I use in Marketplace items, are available for free with full credits at Marcat.
I agree, it looks like the Kitely Market is somehow resetting the script, and we'll need help from Ilan or Oren when they get a chance.
I agree, it looks like the Kitely Market is somehow resetting the script, and we'll need help from Ilan or Oren when they get a chance.
- Oren Hurvitz
- Posts: 361
- Joined: Sun Dec 23, 2012 8:42 am
- Has thanked: 19 times
- Been thanked: 500 times
- Contact:
Re: Scripts Reset
Kitely Market doesn't store script states. The reason is that the script state is actually a compiled version of the script, i.e. a DLL. We don't want to store that because the file format of compiled scripts can change, and if that happens then items in the market that were created before the change will stop working, because their DLL won't be compatible with the newer version of OpenSim.
As an example, OpenSim 0.7.6 contains an optional flag (ScriptStopStrategy = co-op) that changes the format of compiled script DLL's. We don't intend to use this particular flag, but future versions of OpenSim may change the DLL format without giving us the choice of staying with the old format.
Therefore, we store only the source code (LSL) of scripts. Scripts must be able to initialize themselves using variables, or by reading data from a Notecard.
As an example, OpenSim 0.7.6 contains an optional flag (ScriptStopStrategy = co-op) that changes the format of compiled script DLL's. We don't intend to use this particular flag, but future versions of OpenSim may change the DLL format without giving us the choice of staying with the old format.
Therefore, we store only the source code (LSL) of scripts. Scripts must be able to initialize themselves using variables, or by reading data from a Notecard.
- Marstol Nitely
- Posts: 486
- Joined: Mon Dec 24, 2012 1:42 am
- Has thanked: 1022 times
- Been thanked: 441 times
- Sherrie Melody
- Posts: 273
- Joined: Fri Mar 29, 2013 6:56 pm
- Has thanked: 201 times
- Been thanked: 159 times
Re: Scripts Reset
Thanks Oren.
Marstol, I don't know if this will help (you may already be taking advantage of these features), but:
I was looking at http://metaverse.mitsi.com/Secondlife/P ... -animator/, where Fred has the instructions. It has a screen shot of a dialog, including a button "Notecard" used to dump animations to a notecard, which would allow that information to be persisted, rather than saving the animations in lists that can be cleared on reset.
Also, down toward the bottom of the comments in that page, he discusses using his prim compiler (http://secondlife.mitsi.com/Secondlife/ ... -Compiler/) instead, which creates hard-coded animation scripts that he says is faster than using notecards.
Marstol, I don't know if this will help (you may already be taking advantage of these features), but:
I was looking at http://metaverse.mitsi.com/Secondlife/P ... -animator/, where Fred has the instructions. It has a screen shot of a dialog, including a button "Notecard" used to dump animations to a notecard, which would allow that information to be persisted, rather than saving the animations in lists that can be cleared on reset.
Also, down toward the bottom of the comments in that page, he discusses using his prim compiler (http://secondlife.mitsi.com/Secondlife/ ... -Compiler/) instead, which creates hard-coded animation scripts that he says is faster than using notecards.
- Marstol Nitely
- Posts: 486
- Joined: Mon Dec 24, 2012 1:42 am
- Has thanked: 1022 times
- Been thanked: 441 times
Re: Scripts Reset
Thanks Sherrie. I've tried those, but they don't seem to be as intuitive as his latest prim animator. I'm sure I'll figure it out eventually or find something more dummy proof! 


