Failed To Set Display Mode Error

BlitzPlus Forums/BlitzPlus Programming/Failed To Set Display Mode Error

Cancer(Posted 2007) [#1]
Whenever debug is off or I create an exe file i get a message saying "Failed To Set Display Mode" and I have no idea what to do...


Cancer(Posted 2007) [#2]
This is the program that im having trouble with:

Graphics 500,500,0,0
Color 255,255,255

drawpatch()

Function drawpatch()
Color Rnd(255),Rnd(255),Rnd(255)
i% = 0
startingX% = Rand(1,500)
startingY% = Rand(1,500)
While Not KeyHit(1)
Plot oldX,oldY
oldX = startingX%
oldY = startingY%
newX% = updateX(oldX%)
newY% = updateY(oldY%)
;WaitKey()
Plot newX,newY
Plot oldX,oldY
Text 240,0,"AMAZING",False,False
;oldX = newX%
;oldY = newY%
Flip

If i% = 6000
gotoFunction()
End If
i% = i%+1
Wend
endFunction()
End Function
Function gotoFunction()
drawpatch()
End Function
;the rand() of the following two functions
;are resoponsible for the size of the boxes.
Function updateX(X%)
newX% = X% + Rand(1,Rnd(200))
Return newX%
End Function
Function updateY(Y%)
newY% = Y% + Rand(1,Rnd(200))
Return newY%
End Function
Function endFunction()
End
End Function


please help....


b32(Posted 2007) [#3]
When using 0 as the 'mode' parameter for Graphics, the window mode is determined by the debug mode.
With debug enabled, the program runs in windowed mode. However, without debug, it tries to run fullscreen. 500x500 is not possible using fullscreen.


Adam Novagen(Posted 2007) [#4]
Also, I notice that your color depth parameter (the fourth number after Graphics) is 0 as well - if you're not going to set the screen mode or color depth, then just leave them out. So like, instead of:
Graphics 800,600,0,0
Just type:
Graphics 800,600
Or if you want to set the screen mode, then something like:
Graphics 800,600,1;or 2 or 3, depending on what you want