have you actually tried running this?
if zn#z# or xn#x# or zn#z# and xn#x#
???? what's that suppose to mean?
Here's some code for a first person camera, using the mouse and arrow keys to move and look around on a matrix. You can even jump. What the heck, I'll write a firing routine as well before posting.