Hey there,
i was just wondering if the following is a known bug or not with the editor/compiler (or a feature?!? :P), cause i didn't find anything related so far in the bug tracker or forum:
//---------------------
// AGS version: v3.2.1
//---------------------
float a = 3.0;
a *= -1.0; // NOK: parse error at 'a'
a = a * -1.0; // NOK: invalid use of operator '*'
a = -1.0 * a; // OK
took me quite some time to figure out what was blocking my script to compile... :(
1. AGS does not support *= and /= operators (but does += and -=).
2. AGS does not support this sort of expression:
a = a * -1.0;
where '*' and '-' follow each other. The proper way is to use brackets to distinct two operators:
a = a * (-1.0);
ah, i see.
makes sense and hopefully i will not run into it again, now i know it. ;-)
thanks for the explanation