Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How to overcome memory limitations?

Jexx Rayner
Registered User
Join date: 30 Jun 2006
Posts: 16
02-23-2007 13:04
I assume I have run up against the memory limit for a script I am working on, as I am at a point where everything compiles fine but if I add more code it starts to complain about parse errors, syntax specifically but there is nothing violating the rules. For example if I add an additional 'else if' to an existing conditional it will complain to me about a syntax error at a point much later in the script ...

So my question is, what are some good ways to overcome the memory limitations? My script is a programmable particle system script which accepts spoken commands to change the parameters ( similar to Ama Omega's ) so I am not sure how I would split this up into multiple scripts, would love to hear some suggestions from others that have run into this.

Thanks!
Jexx R.
Kaklick Martin
Singer/Songwriter
Join date: 3 Oct 2005
Posts: 175
02-23-2007 13:39
Well, you could have one "dispatcher" script that does the listening and parsing that then sends out llMessageLinked() to itself and have individual scripts with the contents of each of the things you had in each segment of the listen lookup table. (Just a thought).
_____________________
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
02-23-2007 13:50
From: Jexx Rayner
I assume I have run up against the memory limit...

Thanks!
Jexx R.


How about putting in a call to llGetFreeMemory()
It will return an integer as to how much memory you really have left.

Rj
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
02-23-2007 14:34
From: RJ Source
How about putting in a call to llGetFreeMemory()
It will return an integer as to how much memory you really have left.

Rj


Afraid its only a rough guide at best.

Spliting such taht you have one or more control scripts and one or more processing scripts is probably the best approach.

I am however intrigued that you are running into the memory limit in a particle script.
Are you sure you are not just running into the nested command limit instead? I think LSL will only handle 10-15 if/else if checks before it starts having problems.
Jexx Rayner
Registered User
Join date: 30 Jun 2006
Posts: 16
02-23-2007 17:57
Thanks for the responses! It turned out to be caused by the limitation on nested if/else conditionals, I had apparently too many and had to swap some stuff around and use some function calls instead to get by.

Appreciate the help, and glad to know about the function to see how much memory is free!

-Jexx