Odd compile error
BlitzMax Forums/BlitzMax Programming/Odd compile error
| ||
SuperStrict Framework BRL.System 'minimize the size of the compiled interpreter Import BRL.LinkedList Import BRL.Max2D Import BRL.Graphics Import BRL.Retro Import BRL.Blitz [[wall of code]] 'execute the program AppTitle="Madness VM" Graphics 400,300 Global io:console=New console io.add "This is a test" io.update 0 Flip WaitKey Parse code The compiler throws me an error at Flip, "Attempt to access field or method of null object". Why? |
| ||
you must import one graphicsdriver moduleImport BRL.D3D7Max2D or Import BRL.D3D9Max2D or Import BRL.GLMax2D |
| ||
Its because there is no graphics object being created. There are two reasons. First, you'll need Import BRL.D3D9Max2D. Second, running that code in release mode will force it to fullscreen, and your hardware likely doesn't support that resolution in fullscreen. Try 640x480 or 800x600. [edit] I'd recommend Framework Assistant to avoid problems like this in the future. |
| ||
Cool, thanks. |