Running from another program make error

Blitz3D Forums/Blitz3D Programming/Running from another program make error

amitjf(Posted 2006) [#1]
I program usually except Blitz3d in Visual Basic, so I made a launcher in Visual Basic and used the 'Shell' command (a command in VB used to run another program, just like Execfile in blitz) to run one of my games in blitz3d and when i ran the launcher i got "memory access violation" error. and when i ran the game without the launcher it ran perfectly. help?


Dreamora(Posted 2006) [#2]
Sounds like you started it like c:\somefolder\bla.exe without switching the folder to somefolder before. If your Blitz game isn't programmed to set the app path to the own location first, it will run into mav because it searches the wrong place for the media to load.


amitjf(Posted 2006) [#3]
I didnt realy get what u say. the blitz3d program have been loaded and the blitz3d program messaged "memory access violation"


amitjf(Posted 2006) [#4]
I got on the problam... I needed to put the launcher in the same directory the game is so it would work


SopiSoft(Posted 2006) [#5]
If you use the ChangeDir() command in your Blitz3D code to set the working directory to that of which the .exe file of your game is in, then it doesn't matter where you start the launcher from.
You can do it like this:
ChangeDir(SystemProperty ("appdir")) 



Wings(Posted 2006) [#6]
try out this. (in B3d)

print curentdir()
waitkey

and see what path is set.
also i recomend checking if all images and sound is loaded before trying to use em.

like this.

image01 = loadimage("Loading.bmp")
if not image01 then print("Errror loading image01") : waitkey : end