LoadAnimImage Failing in .exe (works in IDE)
BlitzPlus Forums/BlitzPlus Programming/LoadAnimImage Failing in .exe (works in IDE)
| ||
In a map editor I coded up for my current side scroller project, I call LoadAnimImage to load the tileset bitmap. When I run in the standard IDE (in and out of debug mode) the program works flawlessly. When I create the executable (with the IDE's Program > Create Executable) the call to LoadAnimImage returns 0 to my tileset variable, crashing the program. The image exists, the syntax is all correct, and the .exe is compiled to the same directory as the code (so all the relative directories are the same). Does anyone have any idea what could be causing this? |
| ||
This link to a FAQ answer is not always so easy to find, but may help: http://www.blitzbasic.com/faq/faq_entry.php?id=20 |
| ||
Well, neither of those things were the case, but thanks David. Turns out it had to do with the way I was opening my .exe. I run XP Home and in my start menu I have the My Documents folder (which contains my projects) as a menu, and for some reason running the .exe's from the menu gives the relative paths a hard time. The .exe's open fine from the folder itself. I'll check the FAQ for problems next time--thanks David. |
| ||
Glad you got it fixed- that link (now?) mentions My Documents and relative paths. For what it's worth I don't necessarily think anyone's a "total beginner" where it says at the end "If you're a total beginner and all that seems too complicated, just put all your image and sound files in the same folder as the program's .bb source file" :) Also I added a comment to the manual entries for Load(anim)Image. |
| ||
I guess I didn't explain myself very well. See the online b+ manual for my comment about this error. Thanks! |