MantisBT - Ecere SDK
View Issue Details
0001125Ecere SDKecpublic2017-03-21 20:372017-03-21 20:37
x86_64:linuxLinux Mint-
0.44 Ryoan-ji 
0001125: += is missing parentheses in generated code

satiation is property int
hp is property int

This line of code:
unit.satiation -= unit.hp / 100 + 2;

Generates this line of generated code:

__ecereProp_Unit_Set_satiation(unit, __ecereProp_Unit_Get_satiation(unit) - __ecereProp_ResourceObject_Get_hp(unit) / 100 + 2)

Note that it's adding on the 2 at the end AFTER doing the subtraction, since the parentheses are missing
No tags attached.
Issue History
2017-03-21 20:37CaptainBlacktonNew Issue

There are no notes attached to this issue.