Looks amazing dude, great job.
I dont know what version of Freebasic you are using but in Fb20b in line 5: Screenres 640,480,32,2,fb.gfx_alpha_Primitives or fb.GFX_FULLSCREEN
It says implicit variable allocation at the fb.gfx_alpha_primitives or fb.GFX_FULLSCREEN parts.