IncBin not working for me. HELP
BlitzMax Forums/BlitzMax Beginners Area/IncBin not working for me. HELP
| ||
I have used IncBin for my game assets. Code below: Incbin "basket.png" Incbin "background.png" Incbin "bark.wav" ect. ect. When I build my exe and run it, everything is fine. When I try to move the exe to another folder (where my images are not) the window for the game pops up and dies right away. No pop up errors are shown. Please help me as I thought the IncBin feature could hide all game assets. Thanks in advance. |
| ||
You need to change your paths accordingly, i.e.:Incbin "image.png" 'image:tImage=LoadImage("image.png") image:tImage=LoadImage("incbin::image.png") |
| ||
I use the following: Local basket=LoadImage( "incbin::basket.png" ) Local background=LoadImage ("incbin::background.png" ) Like I said, after I compile the game the exe runs fine if the images are in the same folder as the exe file. If not then it crashes. |
| ||
make a test program that just incbins one image and draws it to the screen. if that works then you've got something wrong in your code. if it doesn't then you may have found a bug. What version of bmax and what OS are you using. |
| ||
Once you've compiled it the files should be included in your exe and it shouldn't matter where you put the exe. The images are only looked at at compile time. Maybe you need Local basket:TImage= rather than just basket= |
| ||
I updated my Bmax version and it is fixed now. Thanks for your help guys. |
| ||
There was an error in an earlier blitzmax where the position of the incbin statement has to come before the position of the line that loads data from it, but that was fixed, maybe that had something to do with it. |