Jump to content

Full reset/prim clear


Beach Nightfire
 Share

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

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

Recommended Posts

Hello.

I have noticed that when a script is updated,  sometimes a residual script seems to affect the new one.

Even list data is retained, even though the ON_START section has a list myList = []; comment.

I have tried a prim scrubber, however, that is only clearing a few items.

ON_REZ i do a llRest();

 

is it possible for a prim to retain "memory"?  i have been scripting for years, maybe there is an issue (as there is with prim rezzing " at the moment.

How it showed up was when i was doing a remote script update experiment and notice the new script was showing old data in a list.

Another example is, upon restart i get the current prims location, when the prim is playing up, the location vector is <0.0,0.0,0.0>

 

Edited by Beach Nightfire
Link to comment
Share on other sites

 

Updating a script (saving and recompiling) will always result in wiping all of that script's memory. Calling llResetScript will similarly wipe all of that script's memory. There is no way around that, it is simply not possible for a script to "retain" things in memory following a reset/recompile.

What happens afterward depends on how the script is written. The code within the state_entry event will always execute when a script is reset/recompiled. So it may be that your script is simply re-populating variables there.

And even if your script isn't populating variables in the state_entry, it may be that it's sending out signals to other scripts and getting responses back which it in turn uses to populate variables. Again, it really depends on how your script is written. We would need to see actual examples to further assess.

3 hours ago, Beach Nightfire said:

is it possible for a prim to retain "memory"?

Not in relation to scripts. Prims have a collection of "attributes" that do persist through the removal/reset of scripts (again, assuming a  script doesn't' alter those in the state_entry upon reset). Such things like scale, particles, applied texture, color, etc.. Recently, LL added a new feature called "LinksetData" in which a root prim now has access to a small personal Key Value Pair datastore. This is independent from scripts, but I suspect that's not what you're referring to in this case.

  • Like 1
Link to comment
Share on other sites

5 hours ago, Beach Nightfire said:

is it possible for a prim to retain "memory"?

on some very rare occasions a LSL code source file can get corrupted. It can be edited and compiled and weird residual effects like you are seeing can occur

i find the solution to fixing corrupt source files is to copypaste the source code into an text external editor. Create a new script and copy paste the code from the text editor to the new script

. Why this happens I dunno, why that is the fix I dunno,, just that it is on the rare times that it happens

  • Like 2
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 339 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...