How come this works:
PlayerScore(1) = PlayerScore(1) + 1
but this doesn't
Inc(PlayerScore(1))
According to the docs "Inc is shorthand for the expression Variable=Variable+1"
Thanks in advance
Ken
way back in 2005, the INC was only designed to work on variables.
EDIT Modern versions of PlayBASIC have replaced the INC operator with the math short cuts operators such as ++, += etc These can be used on any data type during an assignment. See -> WIP (http://www.underwaredesign.com/forums/index.php?topic=3216.0)
So you can use the ++ operator to replace INC,
EG.. So an expression like this
PlayerScore(1) = PlayerScore(1) + 1
becomes
PlayerScore(1)++
or you can also use += if you like.
PlayerScore(1)+=1 (add 1 to it )
PlayerScore(1)+=20 (add 20 to it)