News:

PlayBASIC2DLL V0.99 Revision I Commercial Edition released! - Convert PlayBASIC programs to super fast Machine Code. 

Main Menu

am i being silly, type & inc

Started by pathfinder, February 04, 2008, 12:33:49 PM

Previous topic - Next topic

pathfinder

oopsy forgot its 1.71g

maybe im being dumb (not the first time lol). I tried to inc a type field, program ran fine but it didnt inc! Probably a known bug. I thought i had better post as it was not producing an error. Lol was scratching my head for 2 hours lol, well a good time to get using debug mode ^^. And debug mode is great I have to say!


type counttest
add as integer
endtype

dim count(10) as counttest


do
cls rgb(0,0,0)
inc addup
inc count(10).add
text 100,100,"inc count(10).add ="+str$(count(10).add)
text 100,200,"inc addup ="+str$(addup)
sync
loop

kevin

#1
 Not a bug.  See help on INC/DEC under FACTS.



NOTE:  Both the INC & DEC commands are considered obsolette, they remain for backward compatible only.   Today it's recommended users use the ++, --, +=, -= operators.    Which can be used on variables, arrays, type fields and even pointers 



pathfinder

ah thats okay then, lol couldnt work out why it wasnt working  ::)

pathfinder

im actually not that shocked.

I also spent an hour coding my rotating shield button, to get the angle. 2 days later i find getangle2d. still was fun, but glad to reclaim some fps :)

such a noob     ;D