Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Where do you save scripts?

Feras Nolan
Registered User
Join date: 30 Mar 2006
Posts: 141
11-25-2006 17:03
That happened me already a couple of times:
Working on a script 20-30 minutes, saving, testing, anything fine, works perfectly even if lagged, cause the Sim lags. Some minutes later Sim crashes and I have to log back in. Work gone. Nothing left.

How does that actually work with saving of scripts on the servers? Do it save the code local on the sim and if the sim crashes say in the next 60 minutes anything is gone? If so, or something like that, any plans about a system that isnt such a overkill for scripters?

If SL would be more reliable it may actually work with a bit of luck, but since the grid is a lag hole and crash parade I would rethink the system. Local scripting logs maybe? Saving inworld saves a copy local as well?
Torley Linden
Enlightenment!
Join date: 15 Sep 2004
Posts: 16,530
11-28-2006 13:11
Hi Feras, I'm forwarding this to inquire further...
_____________________
Kelly Linden
Linden Developer
Join date: 29 Mar 2004
Posts: 896
11-28-2006 14:20
The tricky part is that the inventory item that you see in the object is not the same as the script asset that is the actual script. The inventory item links to the script asset.

The script asset lives in the asset server, assuming it is successfully uploaded a roll back will never cause it to get lost. Also, every saved version is stored in the asset server for a while. If you change it 5 seconds later and re-save there will be 2 scripts in the asset server.

An inventory item in your inventory is stored in the database (as a link to where the asset is). So if you save a script to your inventory, we store a link to the asset item in the database. This will never be lost due to a region roll back.

An inventory item in an object in world exists only on the region you are on (as a link to where the asset is). This can be lost in the case of a region roll back.

What happens then is your script is successfully saved on the asset server, however the roll back reverts the link in the object to point at an old version of the script. the latest script itself may as well be lost because you no longer have a way to get at it, but what was actually reverted was the inventory item link in the object.

We save the state of a region (all data about everything in it) once every hour and in very nearly all crash or shutdown cases at the time of shut down. Sometimes something in the region is what is causing the crash, and after a few attempts to bring up the most recent save, a previous one may be rolled back to. This is what would cause a revert to a previous version.

What this all means is that it is probably a good idea to keep a copy of the script you are modifying in your inventory as well, although this is often tedious.
_____________________
- Kelly Linden