Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

1.1 and script memory size.

Chance Small
Linden PITA
Join date: 30 Jul 2003
Posts: 170
09-21-2003 10:37
I was wondering if in 1.1 the allowed script memory usage would increase. As many of you know I have slot machines that have a LOT of features, and allow you to change just about everything (Payouts, sound volume, etc.) via type command instead of editing the script (makes it easy if you don't know hwo to script), and if I add just one more line of code, II'll esceed the memory cap, and my slot machines will become unusable. I've cleaned my code to use as less amount of code as possible, and also had to comment out a few things that were kind of needed but not very important. And I am unable to break the script into 2 scripts, because the global variables are needed by everything, unless I can somehow make the 2 scripts in the 1 object share variables.

But I am HOPING that in 1.1 the cap will be raised. Does anyone have any information about this, or might know how to make 2 scripts in the same object share variables?

Thanks in advance.
Water Rogers
Registered User
Join date: 1 May 2003
Posts: 286
09-21-2003 11:43
I break up scripts all the time and pass variables back and forth between objects....

My hangman game in Nexus Prime uses about 5 different scripts... and they are safe as long as you make sure you are getting the key of the object it's listening from. Passing variables through say and listen commands is fairly common practice in rather large scripts. Use the llMessageLinked() call that passes to the link_message() event handler if you want to be even more safe.

--Water
_____________________
From: Philip Linden

For the more technically minded - the problem is actually NOT the asset server (or 'asshat' as you prefer to affectionately call it herein).
Alondria LeFay
Registered User
Join date: 2 May 2003
Posts: 725
09-21-2003 17:09
Yeah, definately just split the script up. I ran into the same problem with my chess board, which now has a whole slue of individual scripts.(The move logic itself is divided into four different scripts) As far as how to have the different scripts communicate, well, your part way there as is. You obviously know how to make user->script variable passing, thus it is similar to do a script->script passing. Just parse them in a similar manner.
Chance Small
Linden PITA
Join date: 30 Jul 2003
Posts: 170
09-21-2003 19:15
How would I get my scripts to communicate with each other in a single object without having to create some sort of echo?
Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
09-21-2003 23:53
Link messages.
Chance Small
Linden PITA
Join date: 30 Jul 2003
Posts: 170
09-22-2003 07:16
So if the object link is 0, and I send a linkedmessage from 0 to 0, the other script in object 0 will hear it?
Madox Kobayashi
Madox Labs R&D
Join date: 28 Jun 2003
Posts: 402
09-22-2003 07:24
That's right. You will have to devise some sort of protocol that the scripts use to eliminate the sender acting on its own message.

If you like me to give you some optimizing pointers, I'd be happy to, but you'd have to send me your code here or in game.
_____________________
Madox Kobayashi