Page 1 of 1

operators

Posted: Sat Oct 20, 2012 12:33 pm
by enric
How operators works? where is the definition (I cann't find it)

// this works
x = tilex*100;
x += 50;

// this crashes
x = ((tilex*100) + 50);

// this also crashes
x = (tilex*100) + 50;

Re: operators

Posted: Sat Oct 20, 2012 4:51 pm
by pipfromslitherine
There is a section in the engine docs regarding the differences between the scripting and real C. You cannot use brackets in arithmetic operations, so they generally need to be broken out into different lines.

Cheers

Pip