|
Jasmin Summers
Registered User
Join date: 16 Feb 2006
Posts: 23
|
06-04-2006 11:47
is there a limit to how many variables someone can declare? I have about 20 in 1 script to keep track of different information like profit, money in, money out etc but when ever i try to add one more, i get a syntax error. Here are some screens: COMPILES: http://save-host.com/bug/compiles.jpgDOESN't COMPILE: http://save-host.com/bug/doesntcompile.jpgYou will see that adding 3 new variables causes a syntax error when there is no syntax error. There are no duplicate variable names or anything like that. The only reason I can think of this happening is because there are too many variable declarations but still, that seem's a bit odd. edit: ahh this is so frustrating! When ever i try to add a variable to something like .... play(integer score, integer a, integer b) { //...code omitted } ...it says syntax error aswell but when ever i left it as... play(integer score) { //...code omitted } .. it compiles! Again, there are no duplicate variables (and if there was then it wouldn't report a syntax error, it would say "Name previously declared within scope"  Why is this happening??
|
|
Lazink Maeterlinck
Registered User
Join date: 8 Nov 2005
Posts: 332
|
06-04-2006 12:35
When you get the syntax error, what is on like 295? the parser is pointing you to that line. Hard to help you with that compile since it seems like all your doing is adding more variables. You MIGHT be at your limit on memory as well. Just some thoughts
|
|
Jasmin Summers
Registered User
Join date: 16 Feb 2006
Posts: 23
|
06-04-2006 12:45
From: Lazink Maeterlinck When you get the syntax error, what is on like 295? the parser is pointing you to that line. Hard to help you with that compile since it seems like all your doing is adding more variables. You MIGHT be at your limit on memory as well. Just some thoughts im not at my limit and on line 295 is code that has nothing to do with those variables. I did a memory check and i still had like 3.8k memory left.
|
|
uzi Under
The Card Lady
Join date: 14 Mar 2005
Posts: 31
|
06-04-2006 12:52
I don't know if there is a declaration limit, but if there is, it's certainly more than 20 which you mentioned. Hard to analyse without seeing more of your code, so you could try pasting the script into the lslint compiler at www.w-hat.com, it may give you different messages and more clues to help you identify. Good luck - U2
|
|
Jasmin Summers
Registered User
Join date: 16 Feb 2006
Posts: 23
|
06-04-2006 14:00
after talking and submitting the script to linden, turns out there are a few compilier errors that caused the problem and it is not my fault. So their suggestion was to work around it. LInden also said they were in the process of completely rewritting their compiler but it wont be released for awhile yet, wow thats great. He suggested checking free memory etc and that is something i had already done but the wiki also says the memory checker is broken!
Everything is broken, the SL scripting/compiler program is shiat.
|