Executable Error

BlitzPlus Forums/BlitzPlus Beginners Area/Executable Error

En929(Posted 2011) [#1]
I'm trying to make an executable file for the game that I made so far. But, I keep getting an error that says "Failed to Display Mode" when I make it. Thus, what do I need to do to my code to make it an executable file that will play on any computer (and by the way I'd again like to thank the ones who helped me learn how to create games using BlitzBasic. Last year I knew absolutely nothing (not even the mathematics part of making games and I'm no math wiz either). I'm not done with my game yet, but still I'd like to credit those for helping me get this far.

Thanks





Last edited 2011


xlsior(Posted 2011) [#2]
Blitzplus creates exe's that should be able top run on any computer.

Couple of potential problems:

1) Did you copy all your media files along with the executable? Note that they do NOT get included in the final .exe by default, so you need to package up both the .exe as well as all of the external files that get references (the PNG's in your case)

2) 1600x900 isn't a very commonly used resolution -- good chance that other computers you're trying it on may not support it, which would result in an error.
Before calling 'Graphics', try checking to make sure that the resolution you are asking for exists on the computer:

intModes=CountGfxModes() 
Print "There are " + intModes + "graphic modes available:" 
; Display all modes including width, height, and color depth 
For t = 1 To intModes 
Print "Mode " + t + ": 
Print "Width=" + GfxModeWidth(t) 
Print "Height=" + GfxModeHeight(t) 
Print "Height=" + GfxModeDepth(t) 
Next 
WaitKey()



Floyd(Posted 2011) [#3]
It's a week too late, but I just noticed this.

The real problem is most likely the default screen mode, which is used because nothing was specified in Graphics.

With Debug on the default is windowed mode, so 1600x900 is just fine.
But with Debug off the default is full screen and 1600x900 is probably not available.


En929(Posted 2012) [#4]
Thanks xlsior and Floyd. After learning more about programming for a while, I found out the reason that my executable wasn't working was because I simply didn't run the executable from inside the folder. I thought that the executable could be ran from anywhere on the computer simply because I thought it was a standalone application. But, now I found out that it has to run from inside the folder in which all the objects are also located. Thanks again for helping me.

P.S. That's ok Floyd. I too am now late with this post. Even MUCH later.

Last edited 2012