.exe file problems
BlitzPlus Forums/BlitzPlus Beginners Area/.exe file problems
| ||
After creating an .exe file of my game I discovered that it does not work on another PC (works fine on mine) - could somebody tell me what I should do? Many thanks. |
| ||
Did you load anything in that game? music, gfx, maps, .ini files etc. etc. etc. If so, perhaps it can't find these files.. perhaps you used absolute paths..? If so: don't. :P |
| ||
Thanks for help, yes I do have Gfx etc in C:\Program Files\Blitz Basic\GAME\Gfx, I then changed path to GAME\Gfx and found that the program could not find gfx etc. |
| ||
You have to tell your program where to find assets - it doesn't magically know if you start renaming folders. Create your executable in the same location as the source code. Use relative paths i.e. "Game\gfx" instead of "C:\Program Files\Blitz\another folder\my games\Game\gfx". That way your stuff will work through the IDE, and as an executable. |
| ||
To prevent errors like these you might want to spend a few hours on new loading functions with proper error reporting. Something like this: Function LoadImage2(f$,flags=1) i=LoadImage(f$,flags) If not i RuntimeError "Image ["+f$+"] not found!" Return i End Function ..but then a whole lot o' functions like these. |
| ||
Thanks for replies, have now solved problem, was using "C:\Program Files\Blitz\etc as path. |