Null Max2dDriver
BlitzMax Forums/MaxGUI Module/Null Max2dDriver
| ||
I'm trying to add a map to my GUI, but I've run into a problem... Its giving me the usual error. Unhandled Exception:Attempt to access field or method of Null objectBut its reporting it on _max2dDriver.Cls within Cls(). |
| ||
I'm guessing that it's because you failed to import BRL.D3D7Max2D and BRL.GLMax2D. |
| ||
Just a note: that is a horrible implementation for a module. |
| ||
Khomy Prime: I included the code to import those, but nothing happened different, same problem. Plash: I obviously didn't include ALL the code... so there are some reasons for some manipulations. Another thing is that I'm still working on getting it functional, I've not even begun work on one aspect... I intend on getting it functional first, then pretty, and finally fast if necessary. In any case, I'd be interested in knowing what's so wrong about it, and what you would do to fix it.. I'm aware that I'm using too many Globals and I intend on eliminating many of them, some however require direct manipulation in the main program. |
| ||
A module should contain types/functions/features frequently used, you will probably run into some problems using the constant state of your gadgets, and the like, with the way it is. |
| ||
Ah... Well I'm not exactly making a module per ce. Its more of a framework/engine/base on which to build a game... I'm mostly developing it for myself. |
| ||
I included the code to import those, but nothing happened different, same problem. Did you recompile the module..? |
| ||
The changes wouldn't be implemented if I didn't. Anyway, yes I did. |
| ||
Does it help if you add this line before the CLS: SetViewport 0,0,GadgetWidth( Map_Canvas),GadgetHeight( Map_Canvas) |
| ||
I've now tried that, nothing changed. And I recompiled the module. |