Hi,
I've just started work on a new game which makes use of one exe as the main source code and 2 which are linked with #inculude.
When I go to compile the main source code the compiler appears but the bar does not progress at all. Then after a while, the egg timer by the mouse disapears too and nothing happens. It appears to be using 100% CPU according to task manager but is still responding. When eventually I give up on it, it cancils fine.
The code I'm trying to compile is as follows:
REM *** Run Intro ***
#include "Tezcatlipoca Games\Tezcatlipoca Games.exe"
PlayLogo()
REM *** Define Types ***
type TextBoxType
nTextBoxNumber as integer
sTextBoxText as string
endtype
type CommandButtonType
nCommandButtonNumber as integer
sReturnValue as string
endtype
type CheckBoxType
nCheckBoxNumber as integer
sCheckBoxValue as string
endtype
REM *** Load Functions ***
#include "Rags To Riches GE\Rags To Riches GE.exe"
REM *** Run Game ***
DeclareGlobals()
SetGameSettings()
LoadMedia()
do
sPage = MainMenu() ` Back page 1
select sPage
case "Play Game" ` Play Game
PlayGameOptions()
endcase
case "Tutorial" ` Tutorial
Tutorial()
endcase
case "Credits" ` Credits
Credits()
endcase
case "Exit" ` Exit
exit
endcase
endselect
loop
end
REM ***** Functions *****
function LoadMedia()
REM *** Load Sprites ***
create animated sprite 1,"Graphics\Sprites\Background.png",1,1,1 ` Background
create animated sprite 2,"Graphics\Sprites\ttlRagsToRiches.png",1,1,2 ` Title
REM *** Set Sprite Priorities ***
set sprite priority 1,0
set sprite priority 2,1
REM *** Set Sprite Frames ***
SetSpriteFrames(2)
REM *** Size Sprites ***
size sprite 1,1024,768
REM *** Offset Sprites ***
OffsetSprites(2)
REM *** Place Sprites ***
sprite 1,screen width() / 2,screen height() / 2,1
sprite 2,screen width() / 2,screen height() / 4,2
endfunction
function MainMenu()
REM *** Variables ***
sInput$ = ""
nOutput = 0
REM *** Draw Screen ***
NewScreen(1,2,0,3,0)
DrawButton(50,"Play Game",screen width() / 2,(screen height() / 6) * 2) ` Play Game
DrawButton(52,"Tutorial",screen width() / 2,(screen height() / 6) * 3) ` Tutorial
DrawButton(54,"Credits",screen width() / 2,(screen height() / 6) * 4) ` Credits
DrawButton(56,"Exit",screen width() / 2,(screen height() / 6) * 5) ` Exit
REM *** Get Input ***
sInput$ = CheckInput()
endfunction sInput$
function PlayGameOptions()
hide all sprites
print "Congratulations!"
wait key
end
endfunction
function Tutorial()
endfunction
function Credits()
endfunction
function LoadFiles()
create animated sprite 1,"Tezcatlipoca Games\Tezcatlipoca Game Files\Papyrus.jpg",1,1,1
create animated sprite 2,"Tezcatlipoca Games\Tezcatlipoca Game Files\Tezcatlipoca Games.bmp",1,1,2
load sound "Tezcatlipoca Games\Tezcatlipoca Game Files\Gong.wav",1
endfunction
Note that no error appears. It just simply stops working like a program in an infinite loop.
Any thoughts on what might be the problem? Thanks,
Lucas Tiridath.