#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <iostream>
#include <cctype>
#include <windows.h>
//"Mage Wars" copyright Crimson Games 2007. All rights reserved.
//Created by Arnack, distributing this source is permited, as long
//as ownership is shown.
using namespace std;
int always = 1;
int gold = 10;
int level = 1;
int health = 10;
string city;
int check = 1;
string area;
void stats()
{
cout << "|------------------------------|\n";
cout << "| ~STATS BAR~ |\n";
cout << "|------------------------------|\n";
cout << " You are level " << level << "! \n";
cout << " You have " << gold << " gold!\n";
cout << " Current Area: " << area<< " \n";
cout << " Current City: " << city <<"\n";
cout << "|------------------------------|\n\n";
}
void start()
{
city = "Paradon";
cout << "\nHello, and welcome to the world of Coloren. ";
cout << "This land is ruled by evil, twisted creatures coined \"Lethars\". \n";
cout << "They have corrupted the world with their evil. The land screams of an hero, and I have selected you. \n";
cout << "Good luck, stranger.\n\n";
system("PAUSE");
check = 2;
}
void maingame()
{
system("CLS");
void stats();
city = "Paradon";
area = "Outside StoneKeg Inn";
cout << "Elder Herald: \"There are many things to do before you will become recognized.";
cout << "You may buy and sell items at the town shoppe. Also, you can go out in the wilderness and fight enemies.";
cout << "Come see me when you are level 5 or higher.\"" << endl;
system("PAUSE");
}
int main()
{
while (always == 1)
{
system("CLS");
stats();
if (check == 1)
{
start();
}
else
{
maingame();
}
}}
My problem is that after I get past the first void and go onto the second void, the stats void does not even come up.