Array problems

Blitz3D Forums/Blitz3D Beginners Area/Array problems

Nexus6(Posted 2016) [#1]
Hi guys, i could do with a little help here, im trying to reduce the value stored in an array by 1

heres the line -

If grid(x,y,1)=0 And y<60 And grid(x,y+1,1)>0 Then grid(x,y,1) = grid(x,y,1)-1

But instead of reducing the value by 1, it sets it as an absolute value of -1

How can i reduce it by 1 instead of setting it to -1

Thanks in advance


Nexus6(Posted 2016) [#2]
Sorry, my bad, it does work fine, another piece of code was changing the value.