Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Soo why can we still not subtract numbers?

Stabby Switchblade
Unregistered User
Join date: 9 Jan 2006
Posts: 7
11-10-2006 12:55
For example:
llGetSubString(msg,0,llStringLength(nmsg)+1); - Works
llGetSubString(msg,2,llStringLength(nmsg)-1); - Doesn't work

For it to work you have to declare a whole new integer, and use a basic math expression, which you can probably guess is a hassle. Probably has been discussed before but this has been an issue for as long as I can remember. Are there any plans to fix it?
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
11-10-2006 12:57
I thought the parser was broken, and it would work if you put spaces around the '-' character?
Stabby Switchblade
Unregistered User
Join date: 9 Jan 2006
Posts: 7
11-10-2006 12:58
Well are they planning to fix the parser then?
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
11-10-2006 13:05
Dunno :) I always put spaces around my operators, so I've never even encountered this issue.

If you wanted a definitive answer, maybe you could post a question in the 'Linden Answers' forum. This forum is mostly scripters trying to help each other, there are only a few people here with any real insight into the inner workings of SL.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
11-10-2006 14:01
Ziggy is Correct, its a known bug.
Raeyan Aldrich
Registered User
Join date: 14 Oct 2006
Posts: 44
11-11-2006 18:53
it's always a good coding practice to put spaces around operators. mainly due to the fact that

-variablename; takes the inverse value of that variable.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
11-11-2006 22:56
This is a bug older then time. Live with it. Anyway, whitespace makes the forum software happy (when you post scripts).
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey