Run executables from c++ boot menu
by dompadidodadollidado · in Torque Game Engine · 02/27/2008 (2:37 pm) · 4 replies
Hi!
I need to run torque executables from a program I've written i c++. The games run perfectly fine when I start them from windows explorer, but when I run from my program using system(gamepath) it gives me 2 error boxes.
first:
Failed to open "main.cs"
second:
Failed to initialize game, shutting down.
The games are built in Torque 2d, which my school bought (that's the indie licence if I remember correctly). I can't figure out what is wrong and can't get a hold of the first year students (they have login for developer forum) nor teacher.
I hope this is the right place to ask, looked most suitable.
Thanks
I need to run torque executables from a program I've written i c++. The games run perfectly fine when I start them from windows explorer, but when I run from my program using system(gamepath) it gives me 2 error boxes.
first:
Failed to open "main.cs"
second:
Failed to initialize game, shutting down.
The games are built in Torque 2d, which my school bought (that's the indie licence if I remember correctly). I can't figure out what is wrong and can't get a hold of the first year students (they have login for developer forum) nor teacher.
I hope this is the right place to ask, looked most suitable.
Thanks
#2
EDIT: Matthew beat me to it.
02/27/2008 (2:40 pm)
You need to set the working directory of the process. Not quite sure how to do that in C++ though.EDIT: Matthew beat me to it.
#4
placed the game-executable/folder in same directory as my program and that worked great!
now I only need to work the the _chdir, doesn't seem that hard.
thanks again!
02/27/2008 (2:58 pm)
Thanks a lot for the fast responds!placed the game-executable/folder in same directory as my program and that worked great!
now I only need to work the the _chdir, doesn't seem that hard.
thanks again!
Torque 3D Owner Matthew Jessick