|
Chaz Longstaff
Registered User
Join date: 11 Oct 2006
Posts: 685
|
09-13-2007 07:48
in lslint i get:
"Expression and constant without operator"
for this:
integer tmpfloornum = (integer)floor_num - 1 ;
still get it even when I recast it like this:
integer tmpfloornum; tmpfloornum = ( (integer)floor_num-1 );
what am I not seeing here?
|
|
Lyn Mimistrobell
(waiting)
Join date: 11 Jan 2007
Posts: 179
|
09-13-2007 07:55
I expect this code is outside any function or state, IE in the global section of your script. You cannot use expressions in the global section.
If that's not the case, I suggest you post the code...
|
|
Lucius Nesterov
Registered User
Join date: 12 Oct 2006
Posts: 33
|
09-13-2007 07:56
What did you put into floor_num?
|
|
Triple Peccable
Registered User
Join date: 7 Jul 2007
Posts: 70
|
09-13-2007 09:55
When you typecast an expression, the expression must be in parenthesis. Your line should be:
integer tmpfloornum = (integer)(floor_num - 1) ;
|
|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
09-13-2007 09:56
Put a space before and after the minus sign. LSL has a bug in its interpretation of negative signs versus minus signs, and lslint probably checks to make sure you're not going to trigger it with your code.
|
|
Masakazu Kojima
ケロ
Join date: 23 Apr 2004
Posts: 232
|
09-13-2007 14:28
The full error should read:
ERROR:: ( 5, 35): Expression and constant without operator. Are you doing `foo-2`? Separate operators with spaces. See: http://secondlife.com/badgeo/wakka.php?wakka=knownbugs
Are you not getting the additional lines anywhere? What editor are you using? edit: I gotta fix the links sometime, http://lslwiki.net/lslwiki/wakka.php?wakka=KnownBugs
|
|
Chaz Longstaff
Registered User
Join date: 11 Oct 2006
Posts: 685
|
09-13-2007 15:50
hmm, have tried all these suggestions and more, but nothing will make lslint happy.
But you know, the code actually works inworld, so I'm going to just leave it as is and forget about it.
|