Why error?
BlitzMax Forums/BlitzMax Programming/Why error?
| ||
Framework BRL.Basic Framework BRL.System Framework BRL.Max2D Graphics 800,600,0 Flip WaitKey End Error: "M:/Blitzmax/samples/test.debug" Unhandled Exception: Attempt to access field or method of Null object Graphics [f:\blitzmax\mod\brl.mod\max2d.mod/max2d.bmx;108;2] test [M:\Blitzmax\samples/test.bmx;5;1] Process complete It seems to try to open the max2.mod on F:\ but I don't have that drive letter on my system! Suggestion to mark: it's handy to have the exact module name on top of the page in module help pages. Then you exactly know which file to include with "Framework". ps: Framework command doesn't highlight in IDE. |
| ||
Framework BRL.Basic Import BRL.System Import BRL.glMax2D Graphics 800,600,0 Flip WaitKey End |
| ||
Hi Kanati, Why do I need to type "Framework" in line 1, and use "import" on line 2 and 3? The error still occurs. "M:/Blitzmax/samples/test.debug" Unhandled Exception: Attempt to access field or method of Null object Graphics [f:\blitzmax\mod\brl.mod\max2d.mod/max2d.bmx;108;2] test [M:\Blitzmax\samples/test.bmx;5;1] Process complete |
| ||
probably don't... But I noticed that's what others were doing so I did it as well... But it wasn't THAT that changed. I used BRL.glMax2D instead of BRL.Max2D I don't know WHY that works; only that it does. For that matter... you only need the BRL.glMax2D framework line. The other imports are not required. |
| ||
Framework tells the system not to autoimport every module BMax has at its disposal. So you start out with a base module that Framework references, and import every other module you want after that (since you can only have one base framework - the rest builds on the base). There have been arguments made to drop Framework's module parameter and even to change the name of the command to something like DisbaleAutoImport, which then just acts like a switch and you import every module you want after that manually. Seems to make more sense to me... |
| ||
Yes Riot, I agree, that makes more sense to me too. |