Program Crashes
- Posted by Icy_Viking Dec 15, 2015
- 1533 views
Hello,
Whenver I try to launch an executable file from my program, it crashes. I have it so that you can launch .exe files from within the program, but when trying to launch them, my program crashes. Here is my code. Maybe I'm not loading it correctly?
procedure Launched(integer self, integer event, sequence parm) parm = getOpenFileName(MainWin,"",{"Exe Files","*.exe"}) if parm = -1 then self = message_box("Could not open file!","File",MB_OK) else x = system_exec(parm,0) end if if x = -1 then self = message_box("Could not launch game","Launcher",MB_OK) elsif x = 0 then times_game_played += 1 end if end procedure setHandler(Launch_Game,w32HClick,routine_id("Launched"))
I can post more code if it is needed.