Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Dynamic Script Creation (Storage)

Shifting Dreamscape
Always questioning ...
Join date: 12 Dec 2007
Posts: 266
06-12-2008 07:30
Hi All!

I have looked around and cannot seem to find an answer so here we go ...

I want to set up a dynamic, records storage system. Along the lines of the main application saves sales records for a defined period, and then dumps them to history. My first thought was to create a new instance of a storage script and then dump the data there. But from what I have been able to find, I cannot duplicate a script in the same prim, nor can I copy a 'template' script giving it a new name.

Is this correct?

Or is there a way that I can take script_a, for example, and create a new copy in the same prim called script_a1?

For the moment the only thing I can see that I could do would be to rezz a new object that contains the storage script ... but that is quite prim heavy obviously.
Atom Burma
Registered User
Join date: 30 May 2006
Posts: 685
06-12-2008 07:32
I would highly recommend dumping to a URL or e-mail addy. Scripts seem to max out really fast inworld. Once they run out of memory, there goes your data. And they will, quickly.
Shifting Dreamscape
Always questioning ...
Join date: 12 Dec 2007
Posts: 266
06-12-2008 07:38
Part of the process would dump the period data to email but wnated to be able to key an inworld accessable record as well
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
06-12-2008 08:34
In-world storage is dicey at best. Your best bet is to get the data into off-world storage asap, and operate from there.

However, you cannot create a new script and get it to run without first taking the object into inventory and re-rezzing. A script can llGiveInventory() itself to the same prim, which will name it with consecutive numbering, but the new copy will not be set running, and there is no way to get it running without take/re-rez from your avatar inventory.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
06-12-2008 09:56
If you really want to, you can rez a new object with a script to hold additional data though, and you could even link/unlink it from the main object. However, the prim(s) will count toward the parcel prim limit. You are correct that you cannot add multiple copies of a script to the same prim programmatically. The folks in this forum have even experimented with some crazy workarounds in the past to try to do it, but the conclusion is that it takes SOME kind of manual user intervention (or a bot) to get a new instance inserted and running.

I agree that the best approach is generally to go off-world ASAP. If desired, you can always setup an interface to query the data back from the external server to use it in-world again.
Shifting Dreamscape
Always questioning ...
Join date: 12 Dec 2007
Posts: 266
06-12-2008 17:34
Thanks all for your input.

Understand the off world option but not trying to create anything too complex, and wanted to keep thing s in world. As it is I guess for simplicities sake will just create a limited historical period and keep it simple.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
06-12-2008 17:41
From: Shifting Dreamscape
Thanks all for your input.

Understand the off world option but not trying to create anything too complex, and wanted to keep thing s in world. As it is I guess for simplicities sake will just create a limited historical period and keep it simple.

Actually you don't really have to go all of that fancy. Just scrap the "dynamic" part and create 5 or 10 or 20 extra scripts, named or numbered sequentially. The list gets to a certain number of entries in a script and it will transfer operations to the next script in line.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Shifting Dreamscape
Always questioning ...
Join date: 12 Dec 2007
Posts: 266
06-13-2008 00:41
Thats exactly what I meant Jesse <grins> ... but as always thanks for the comments and help
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
06-13-2008 03:22
From: Shifting Dreamscape
Thats exactly what I meant Jesse <grins> ... but as always thanks for the comments and help

Ah OK! See my sig :D
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum