thanks. I think it worked, but my program is acting up right now. It isn't working on some things that were working earlier, mainly it isn't registering "void" before the functions.
void autoexec()
{
SetAppName("Test version");
StartMenu();
}
void StartMenu()
{
int MenuBg = LoadImage("Images/TitleScreen.bmp");
int Cursor = LoadImage("images/cursor.bmp");
int MyFont = LoadFont("images/Font.bmp");
int cY = 1;
int cX = 1;
while(!b1)
{
Render();
Rectfill(0,0,320,240,RGB(4,4,4),screen);
Blit(0,0,MenuBg,screen);
TBlit((Cx*150)-120,162+(20*cY),Cursor,screen);
Printstring(50,182,screen,MyFont,"New Game");
Printstring(50,202,screen,MyFont,"Load Game");
Printstring(200,182,screen,MyFont,"");
Printstring(200,202,screen,MyFont,"Quit");
Showpage();
if(Up)
{
Unpress(5);
cY--;
if(cY<1)
cY=2;
}
if(Down)
{
Unpress(6);
cY++;
if(cY>2)
cY=1;
}
if(Left)
{
Unpress(7);
cX--;
if(cX<1)
cX=2;
}
if(Right)
{
Unpress(8);
cX++;
if(cX>2)
cX=1;
}
if(b1)
{
Unpress(1);
if(cX==1 && cY==1)
NewGame();
if(cX==2 && cY==2)
Exit("");
}
}
}
void NewGame()
{
HeroJoin();
int player;
int playergold;
int spawnx = 5;
int spawny = 3;
string TextUpper;
string TextMiddle;
string TextLower;
ClassMenu();
}
void ClassMenu()
{
int MenuBg = LoadImage("images/menu.bmp");
int Cursor = LoadImage("images/cursor.bmp");
int MyFont = LoadFont("images/Font.bmp");
int cY = 1;
while(character[0].classlevel == 0)
{
Render();
Rectfill(0,0,320,240,RGB(4,4,4),screen);
Blit(0,0,MenuBg,screen);
TBlit(72,30+(20*cY),Cursor,screen);
Printstring(30,20,screen,MyFont,"Select Character Class");
Printstring(90,50,screen,MyFont,"Archer");
Printstring(90,70,screen,MyFont,"Soldier");
Printstring(90,90,screen,MyFont,"Noble");
Printstring(90,110,screen,MyFont,"Sailor");
Printstring(90,130,screen,MyFont,"Conjuror");
Printstring(90,150,screen,MyFont,"Apprentice");
Printstring(90,170,screen,MyFont,"Nomad");
Printstring(90,190,screen,MyFont,"Mage");
ShowPage();
if(UP)
{
Unpress(5);
cY--;
if(cY<1)
cY=8;
}
if(DOWN)
{
Unpress(6);
cY++;
if(cY>8)
cY=1;
}
if(b1)
{
Unpress(1);
character[0].classlevel=1;
switch(cY)
{
case 1:
HeroArcher();
case 2:
HeroSoldier();
case 3:
HeroNoble();
case 4:
HeroSailor();
case 5:
HeroConjuror();
case 6:
HeroApprentice();
case 7:
HeroNomad();
case 8:
HeroMage();
}
}
}
Flags[F_CLASS_MENU] = 1;
current[P_MIDDLE].character = 0;
PartyCompile();
freeImage(MenuBg);
freeImage(Cursor);
HookButton(3,"PauseMenu");
Map("Cottage.map");
}
the problem according to the exit message is the "void" in autoexec.