Application Terminates.

Monkey Targets Forums/Desktop/Application Terminates.

Paul - Taiphoz(Posted 2012) [#1]
Sup all.

I have a game which I have now compiled for GLFW, the build and run is fine, the app opens and I get my logo, clicking brings me into the game proper, but the second that I click a button or make a move on the board the app just terminates and closes.

Clicking buttons or making a move on the board plays a sound so I suspect that its a sound issue.


Paul - Taiphoz(Posted 2012) [#2]
Never mind fixed it. DOH! lol.


therevills(Posted 2012) [#3]
Please post the issue and fix so that anyone else who has the issue can view this in the future.


MikeHart(Posted 2012) [#4]
Yes please let us know what the reason was.


Paul - Taiphoz(Posted 2012) [#5]
Oh yeah sorry..

I was using those Interpreter directives to load in the appropriate audio file formats for the appropriate target, but I haddnt added GLFW target to the code so it was trying to play audio that had not been loaded.

		#If TARGET="html5"
			Self.Click = LoadSound("sound/click.ogg")
			Self.Drop=LoadSound("sound/drop.ogg")
			Self.AiDrop=LoadSound("sound/aidrop.ogg")
			Self.WinSound=LoadSound("sound/win.ogg")
			Self.LoseSound=LoadSound("sound/lose.ogg")
			Self.DrawSound=LoadSound("sound/draw.ogg")
		#End
		
		#if TARGET="xna" Or TARGET="glfw"
			Self.Click = LoadSound("sound/click.wav")
			Self.Drop=LoadSound("sound/drop.wav")
			Self.AiDrop=LoadSound("sound/aidrop.wav")
			Self.WinSound=LoadSound("sound/win.wav")
			Self.LoseSound=LoadSound("sound/lose.wav")
			Self.DrawSound=LoadSound("sound/draw.wav")			
		#End		
		
		#if TARGET="flash"
			Self.Click = LoadSound("sound/click.mp3")
			Self.Drop=LoadSound("sound/drop.mp3")
			Self.AiDrop=LoadSound("sound/aidrop.mp3")
			Self.WinSound=LoadSound("sound/win.mp3")
			Self.LoseSound=LoadSound("sound/lose.mp3")
			Self.DrawSound=LoadSound("sound/draw.mp3")			
		#End