LoadAnimImage Failing in .exe (works in IDE)

BlitzPlus Forums/BlitzPlus Programming/LoadAnimImage Failing in .exe (works in IDE)

epiblitikos(Posted 2008) [#1]
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?

David Boudreau(Posted 2008) [#2]
This link to a FAQ answer is not always so easy to find, but may help:

epiblitikos(Posted 2008) [#3]
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.

David Boudreau(Posted 2008) [#4]
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.

epiblitikos(Posted 2009) [#5]
I guess I didn't explain myself very well. See the online b+ manual for my comment about this error. Thanks!