Problem with =+ and Types

BlitzMax Forums/BlitzMax Programming/Problem with =+ and Types

Type oktype
Field a:Int
End Type

Local ok:oktype = New oktype
ok.a = 1
ok.a =+ 1
Print ok.a


It prints 1? Why?

because you're basically saying:
ok.a=1

to increment it, you'll need a colon:
ok.a:+1

Easy mistake to make

Hi,

the correct operator for your operations is:

ok.a :+ 1

Note: It's :+, not =+

yours,
Petman

HCow33 - you a cpp user ? ;D

Yep. I didnt get an error and my program wasn't right. Thanks everyone.