Hi guys, I've been working on this for about a day now. It is a maze game. what you do is you have a maze (represented in a matrix), and you have to find your way to the exit. However, you cannot see the whole maze, and are only told which directions you can go from where you are at that moment. My issue right now is that the program won't work for some reason, I think I'm messing up the getkey. Here is the current code:

prgmMAZE

UnArchive [C]

ClrHome

Lbl (/)

DelVar L

DelVar R

DelVar U

DelVar D

DelVar C

DelVar K

0->A

1->B

A+1->A

If A=25:B+1->B

If A=25:1->A

If ([C](A,B))=2:Goto 1

Goto (/)

End

Lbl 1

If([C](A-1,B))=0:1->L

If([C](A-1,B))=0:Output(4,1,"Left

If([C](A+1,B))=0:1->R

If([C](A+1,B))=3:Goto 2 (This line is for when you reach the end, because the exit is to the right of where the last possible place is)

If([C](A+1,B))=0:Output(4,12,"Right

If([C](A,B-1))=0:1->U

If([C](A,B-1))=0:Output(1,8,"Up

If([C](A,B+1))=0:1->D

If([C](A,B+1))=0:Output(8,7,"Down

While 1

Getkey->C

While 0

Getkey->C

If C=25 and L=1

Then

0->[C](A,B)

2->[C](A-1,B)

Goto (/)

End

If C=25 and L≠1:Goto (/)

If C=27 and R=1

Then

0->[C](A,B)

2->[C](A+1,B)

Goto (/)

End

If C=27 and R≠1:Goto (/)

If C=26 and U=1

Then

0->[C](A,B)

2->[C](A,B-1)

Goto (/)

End

If C=26 and U≠1:Goto (/)

If C=34 and D=1

Then

0->[C](A,B)

2->[C](A+1,B)

Goto (/)

End

If C=34 and D≠1:Goto (/)

End

Goto (/)

Lbl 2

ClrHome

Output(4,5,"You Win!

Pause

ClrHome

End

UnArchive [D]

([C]-[C])+[D]->[C]

Archive [C]

Archive [D]

That's all of the code currently.