So I have this current problem while playing with tilemaps.
Code:
And it seems to redirect me to the beginning line of code:
Code:
I'm not sure what it is that's wrong with my code, and i've tried changing:
Code:
To:
Code:
But that seems to prevent me from going to most of the places on the tile-map.
So how would I get this to work..?
EDIT: Sorry, this is using xLIB. (Forgot to mention.)
Code:
:ClrDraw
:8→X
:8→Y
:[[0,0,0,0,0,0,0,0,0,0,0,0][0,1,1,1,1,1,1,1,1,1,1,0][0,1,1,1,1,1,1,1,1,1,1,0][0,1,1,1,1,1,1,1,1,1,1,0][0,1,1,1,1,1,1,1,1,1,1,0][0,1,1,1,1,1,1,1,1,1,1,0][0,1,1,1,1,1,1,1,1,1,1,0][0,0,0,0,0,0,0,0,0,0,0,0]]→[A]
:
:0→K
:Repeat K=45
:¦
:¦ real(2,0,0,0,12,8,0,12,0,8,1,0,8,0
:¦ real(1,X,Y,1,8,1,2,0,0,0,1
:¦
:¦ X→S:Y→T
:¦
:¦ getKey→K
:¦ If K=24
:¦ X-8→X
:¦ If K=25
:¦ Y-8→Y
:¦ If K=26
:¦ X+8→X
:¦ If K=34
:¦ Y+8→Y
:¦
:¦ If [A](X,Y)=0:Then
:¦ ¦ S→X:T→Y
:¦ End
:
:End
And it seems to redirect me to the beginning line of code:
Code:
:8→X
:8→Y
://Beginning of Matrix : It directs me here.
I'm not sure what it is that's wrong with my code, and i've tried changing:
Code:
:¦ If [A](X,Y)=0:Then
:¦ ¦ S→X:T→Y
:¦ End
To:
Code:
:¦ If [A](X/8,Y/8)=0:Then
:¦ ¦ S→X:T→Y
:¦ End
But that seems to prevent me from going to most of the places on the tile-map.
So how would I get this to work..?
EDIT: Sorry, this is using xLIB. (Forgot to mention.)