Here then compile this. It does the same thing but with less pretties. Also how I post code on the forums.
width = 1024
height = 768
Graphics3d width, height, 0, 1
Setbuffer Backbuffer()
Global dest_cam_x#,dest_cam_z#,dest_cam_pitch#,dest_cam_yaw#
;Load Camera
camera = Createcamera()
Camerarange Camera,1,5000
Positionentity Camera,0,1000,0
gridtex = Loadtexture("media\grid.bmp")
Scaletexture gridtex,100,100
;load Grid
groundplane = Createplane()
Entitytexture groundplane, gridtex
While Not Keyhit(1)
Gosub mouseLook
Renderworld
Flip
Wend
End
;Sets Up MouseLook For The Main Camera
.mouselook
If Mousedown(2)
mxs=Mousexspeed()
mys=Mouseyspeed()
dest_cam_yaw#=dest_cam_yaw#-mxs
dest_cam_pitch#=dest_cam_pitch#+mys
cam_yaw=cam_yaw+((dest_cam_yaw-cam_yaw)/5)
cam_pitch=cam_pitch+((dest_cam_pitch-cam_pitch)/5)
Rotateentity camera,cam_pitch,cam_yaw,0
Movemouse Width/2,Height/2
Endif
Select Mousezspeed()
Case -1
Moveentity camera,0,0,-100
Case 1
Moveentity camera,0,0,100
End Select
Return
width = 1024
height = 768
Graphics3d width, height, 0, 1
Setbuffer Backbuffer()
Global dest_cam_x#,dest_cam_z#,dest_cam_pitch#,dest_cam_yaw#
;Load Camera
camera = Createcamera()
Camerarange Camera,1,5000
Positionentity Camera,0,1000,0
gridtex = Loadtexture("media\grid.bmp")
Scaletexture gridtex,100,100
;load Grid
groundplane = Createplane()
Entitytexture groundplane, gridtex
While Not Keyhit(1)
Gosub mouseLook
Renderworld
Flip
Wend
End
;Sets Up MouseLook For The Main Camera
.mouselook
If Mousedown(2)
mxs=Mousexspeed()
mys=Mouseyspeed()
dest_cam_yaw#=dest_cam_yaw#-mxs
dest_cam_pitch#=dest_cam_pitch#+mys
cam_yaw=cam_yaw+((dest_cam_yaw-cam_yaw)/5)
cam_pitch=cam_pitch+((dest_cam_pitch-cam_pitch)/5)
Rotateentity camera,cam_pitch,cam_yaw,0
Movemouse Width/2,Height/2
Endif
Select Mousezspeed()
Case -1
Moveentity camera,0,0,-100
Case 1
Moveentity camera,0,0,100
End Select
Return