Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Syntax error in Windows client, but not in Linux client

Bebedo Drinkwater
Registered User
Join date: 9 Jul 2006
Posts: 2
02-10-2007 04:21
Hello,

I have a script that fails compilation with a syntax error when I use the Windows client.
If I use the Linux client instead, the script compiles without any problem.
The script also runs perfectly in-world as expected, and it definitely does not have a syntax error.

Anybody ever had this problem?

I observe sometimes getting arbitrary syntax errors in more complex scripts which I manage to solve by regrouping the code in a different way. This is the first time I can state it is not a syntax error, but a compiler bug.

I think of sending in a bug report on this, but I wanted first to hear comments if this is a known problem.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
02-10-2007 08:51
It would help if you posted the offending code but since it compiles and runs in the linux client then it has to be a bug since the compiler should be the same in both.
ed44 Gupte
Explorer (Retired)
Join date: 7 Oct 2005
Posts: 638
02-10-2007 16:27
http://w-hat.com/lslint/ has a window on its web page where you can post your code and it will check it for errors, some far more insightful than what the sl client compiler will give you.

I guess with the coming of mono and the client outsourcing, this is a low priority for LL.

Write once, run anywhere, has been the holy grail for programmers since time immemorial. Java has come the closest, but even java is still not quite there.
Something Something
Something Estates
Join date: 26 Sep 2006
Posts: 121
02-10-2007 18:13
See this previous thread with a very helpful reply by Masakazu Kojima.

In short, split up long if-else if blocks and long functions to avoid bogus "syntax errors" in syntactically correct source code.
Bebedo Drinkwater
Registered User
Join date: 9 Jul 2006
Posts: 2
02-11-2007 03:54
Hello Something,

thx a lot for this hint on the other thread. That was exactly what I was looking for.

So my usual workarounds of breaking up complex if/elsif constructs *is* the solution, and in the other thread I found the explanation why.

I just was perplex because it depended on the client I used, which has been clarified.

Looking at this problem, I really don't understand why they did not implement a switch statement in LSL which would easily avoid such problems.