This is my whole code. Can code's error occur somewhere else?
Filename of the starting level.
string level_str = <Test.WMB>; // give file names in angular brackets
////////////////////////////////////////////////////////////////////////////
// Included files
include <gid01.wdl>; // global ids
include <display00.wdl>; // basic display settings
include <plSelect.wdl>;
include <cameraTarget.wdl>;
include <miscInput01.wdl>;
include <plBipedInput01.wdl>;
include <bipedPhy01.wdl>;
include <bipedAnim01.wdl>;
include <bipedSnd01.wdl>;
include <plBiped01.wdl>;
include <cameraSelect.wdl>;
include <camera3rd01.wdl>;
/////////////////////////////////////////////////////////////////
// Desc: The main() function is started at game start
function main
{
level_load("test.wmb")
}
// set some common flags and variables
// freeze all entity functions
freeze_mode = 1;
// no level has been loaded yet...
gid01_level_state = gid01_level_not_loaded;
// entry: Warning Level (0,1, or 2)
// entry_help: Sets sensitivity to warnings (0 = none, 1 = some, 2 = all).
warn_level = 2; // announce bad texture sizes and bad wdl code
// entry: Starting Mouse Mode (0, 1, or 2)
mouse_mode = 0;
// wait 3 frames (for triple buffering) until it is flipped to the foreground
wait(3);
// now load the level
level_load("test.wmb");
wait(2); // let level load
// level should be loaded at this point...
gid01_level_state = gid01_level_loaded;
//+++ load starting values
// main game loop
while(1)
{
if(gid01_level_state != gid01_level_loaded)
{
// pause the game
freeze_mode = 1;
}
else
{
// un-freeze the game
freeze_mode = 0;
}
wait(1);
}
}
// Desc: this is the function used to restart the game.
function main_restart_game()
{
// wait 3 frames (for triple buffering) until it is flipped to the foreground
wait(3);
// now load the level
level_load(level_str);
// freeze the game
freeze_mode = 1;
wait(2); // 1-level loads, 2-entities load
//+++ load starting values
// un-freeze the game
freeze_mode = 0;
}
// Desc: this is the function used to quit the game.
function main_quit()
{
//+++ // save global skills & strings
exit;
}
/////////////////////////////////////////////////////////////////
// The following definitions are for the pro edition window composer
// to define the start and exit window of the application.
WINDOW WINSTART
{
TITLE "3D GameStudio";
SIZE 480,320;
MODE IMAGE; //STANDARD;
BG_COLOR RGB(240,240,240);
FRAME FTYP1,0,0,480,320;
// BUTTON BUTTON_START,SYS_DEFAULT,"Start",400,288,72,24;
BUTTON BUTTON_QUIT,SYS_DEFAULT,"Abort",400,288,72,24;
TEXT_STDOUT "Arial",RGB(0,0,0),10,10,460,280;
}
/* no exit window at all..
WINDOW WINEND
{
TITLE "Finished";
SIZE 540,320;
MODE STANDARD;
BG_COLOR RGB(0,0,0);
TEXT_STDOUT "",RGB(255,40,40),10,20,520,270;
SET FONT "",RGB(0,255,255);
TEXT "Any key to exit",10,270;
}*/
/////////////////////////////////////////////////////////////////
//INCLUDE <debug.wdl>;