operators

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1855
Joined: Sun May 15, 2011 8:47 am

operators

Post 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;
pipfromslitherine
Site Admin
Site Admin
Posts: 9929
Joined: Wed Mar 23, 2005 10:35 pm

Re: operators

Post 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
Post Reply

Return to “Battle Academy : Modders Corner ”