01-03-2012 Turley:
Changed: major rewrite of primitive operators +,-,*,/,...
major speedup of +=,-=,...
Added: finally support for +=,-=,*=,/=,%= with objectmembers, like who.resist_fire_mod+=1
Note: if member would return UnInit or Error it does nothing
so its like (only faster and atomic):
var temp:=who.resist_fire_mod;
if (!(TypeOfInt(temp) in {OT_UNINIT,OT_ERROR}))
temp+=1;
who.resist_fire_mod:=temp;
endif
Code: Select all
print ("whatmaxhp="+what.maxhp);
print ("whatquality="+what.quality);
print ("whatquality*what.maxhp="+what.maxhp* what.quality);- whatmaxhp=<uninitialized object>
whatquality=<uninitialized object>
Segmentation fault
After 10 hours non-stop searching i got it...
developers should take a look into all of primitive operators, i think...