SetBlend not working
BlitzMax Forums/BlitzMax Programming/SetBlend not working
| ||
The Bmax documentation says that SetBlend is a member of the BRL.Max2D module, but when running this code, I get an Unhandled Exception:Attempt to access field or method of Null object Also, when commenting out that SetBlend line, I'm given an unpleasant "CreateGraphics failed:Attempt to access field or method of Null object" in the output area. How can I fix this? Run it yourself to reproduce the issue. Framework BRL.Graphics Import BRL.Max2D Import BRL.Blitz Graphics 640,480 SetBlend ALPHABLEND End |
| ||
Its failing because it can't greate a graphics object. You also need: Import BRL.D3D9Max2D |
| ||
Now it fusses about MidHandleImage. What's going on there? Someplace there needs to be an exhausive list of what modules are required for each command. |
| ||
But it still dislikes MidHandleImage You will probably find that MidHandleImage is just fine - the problem will be when you try to load an image as you have not imported brl.PNGLoader, brl.JPGLoader, brl.TGALoader or brl.BMPLoader.Seriously - don't bother with Framework/Import until your game is finished. After that just use Framework Assistant to tell you exactly what you need. Someplace there needs to be an exhausive list of what modules are required for each command. There is. Press F1 twice on a command to go to its documentation - the containing module is shown at the top of the page. |
| ||
I have finished my game, and I did that on the functions it threw up an error for. I just didn't think of the error being from the image loading. Also, the download link for the framework assistant is broken :/ |
| ||
Oh. You can get a slightly older version here |