Program Crashes

new topic     » topic index » view thread      » older message » newer message

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.

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu