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...
Failed To Set Display Mode Error
BlitzPlus Forums/BlitzPlus Programming/Failed To Set Display Mode Error 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....
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....
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.
With debug enabled, the program runs in windowed mode. However, without debug, it tries to run fullscreen. 500x500 is not possible using fullscreen.
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,0Just type:
Graphics 800,600Or if you want to set the screen mode, then something like:
Graphics 800,600,1;or 2 or 3, depending on what you want