Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Problem With A Text Based RPG Game

$
0
0
I am working on a text based game and I am having some problems when it comes to the saving variables of races/classes, it gives me multiple errors and says it is undefined. I am not understanding where though, can anyone help me??

// Adventure Quest.cpp : Defines the entry point for the console application.
//

#include <cstdio>
#include <cstdlib>
#include "stdafx.h"
#include <cmath>
#include <ctime>
#include <iostream>
#include <string>
#include <windows.h>
using namespace std;

int Choice;

struct Character
{	
	string Name;
	string Gender;
	string Race;
	string pClass;
	int Level;
	int Strength;
	int Intelligence;
	int Defense;
	int Health;
	int Experience;
	int Gold;
	int Keys;
	string Weapon;
	string Armor;
};
void HumanClass()
{
	cout<<" 1 - Warrior\n"
		<<" 2 - Paladin\n"
		<<" 3 - Ranger\n"
		<<" 4 - Cleric\n\n"
		<<"Class: ";
	int Input;
	cin>>Input;
	switch(Input)
	{
		case 1:
			pClass = "Warrior";
				cout<<"\nYou chose to be a Warrior."<<endl;
				cout<<"\nThe Warrior has the widest array of weapons to choose from in the game, being"<<endl;
				cout<<" able to equip every weapon type in the game except for wands. Warriors,"<<endl;
				cout<<" alongside Paladins, are the only classes that can equip Plate armor, the"<<endl;
				cout<<" heaviest armor type in the game. Warriors can use a wide array of combat"<<endl;
				cout<<" skills but lack any kind of magical abilities.\n\n"<<endl;
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		case 2:
			pClass = "Paladin";
				cout<<"\nYou chose to be a Paladin."<<endl;
				cout<<"\nThe Paladin is considered to be a melee-oriented hybrid class. They are able"<<endl;
				cout<<" to equip Plate armor. Paladins can use a wide range of weapons as well as"<<endl;
				cout<<" they have the ability to heal themselves as well as their allies. Most"<<endl;
				cout<<" Paladins are normally humans, an all around class, and they are a very"<<endl;
				cout<<" versatile class.\n\n"<<endl;
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		case 3:
			pClass = "Ranger";
				cout<<"\nYou chose to be a Ranger."<<endl;
				cout<<"\nThe Ranger is based on warriors who use tracking and other wilderness skills"<<endl;
				cout<<" to hunt down their enemies. Rangers can only wield Daggers and Bows, have the"<<endl;
				cout<<" ability to enchant their arrows with magic, and can wear up to Leather armor."<<endl;
				cout<<" Rangers are very agile and have all around stats.\n\n"<<endl;
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		case 4:
			pClass = "Cleric";
				cout<<"\nYou chose to be a Cleric."<<endl;
				cout<<"Most clerics have powers to heal wounds, protect their allies and sometimes"<<endl;
				cout<<" resurrect the dead. Clerics are limited to Cloth armor and must use blunt"<<endl;
				cout<<" weapons such as maces or staves. Clerics primarily use Holy magic to do "<<endl;
				cout<<" damage and heal. Clerics boast high Intelligence and little Strength.\n\n";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		default:
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
				cout<<"\n\nError - Invalid input; only 1, 2, 3, 4, or 5 allowed.\n\n";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
				HumanClass();
	}
}
void DwarfClass()
{
	cout<<" 1 - Warrior\n"
		<<" 2 - Paladin\n"
		<<" 3 - Ranger\n"
		<<" 4 - Cleric\n\n"
		<<"Class: ";
	int Input;
	cin>>Input;
	switch(Input)
	{
		case 1:
			pClass = "Warrior";
				cout<<"\nYou chose to be a Warrior."<<endl;
				cout<<"\nThe Warrior has the widest array of weapons to choose from in the game, being"<<endl;
				cout<<" able to equip every weapon type in the game except for wands. Warriors,"<<endl;
				cout<<" alongside Paladins, are the only classes that can equip Plate armor, the"<<endl;
				cout<<" heaviest armor type in the game. Warriors can use a wide array of combat"<<endl;
				cout<<" skills but lack any kind of magical abilities.\n\n"<<endl;
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		case 2:
			pClass = "Paladin";
				cout<<"\nYou chose to be a Paladin."<<endl;
				cout<<"\nThe Paladin is considered to be a melee-oriented hybrid class. They are able"<<endl;
				cout<<" to equip Plate armor. Paladins can use a wide range of weapons as well as"<<endl;
				cout<<" they have the ability to heal themselves as well as their allies. Most"<<endl;
				cout<<" Paladins are normally humans, an all around class, and they are a very"<<endl;
				cout<<" versatile class.\n\n"<<endl;
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		case 3:
			pClass = "Ranger";
				cout<<"\nYou chose to be a Ranger."<<endl;
				cout<<"\nThe Ranger is based on warriors who use tracking and other wilderness skills"<<endl;
				cout<<" to hunt down their enemies. Rangers can only wield Daggers and Bows, have the"<<endl;
				cout<<" ability to enchant their arrows with magic, and can wear up to Leather armor."<<endl;
				cout<<" Rangers are very agile and have all around stats.\n\n"<<endl;
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		case 4:
			pClass = "Cleric";
				cout<<"\nYou chose to be a Cleric."<<endl;
				cout<<"Most clerics have powers to heal wounds, protect their allies and sometimes"<<endl;
				cout<<" resurrect the dead. Clerics are limited to Cloth armor and must use blunt"<<endl;
				cout<<" weapons such as maces or staves. Clerics primarily use Holy magic to do "<<endl;
				cout<<" damage and heal. Clerics boast high Intelligence and little Strength.\n\n";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		default:
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
				cout<<"\n\nError - Invalid input; only 1, 2, 3, 4, or 5 allowed.\n\n";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
				DwarfClass();
	}
}
void GnomeClass()
{
	cout<<" 1 - Warrior\n"
		<<" 2 - Ranger\n"
		<<" 3 - Cleric\n"
		<<" 4 - Sorcerer\n\n"
		<<"Class: ";
	int Input;
	cin>>Input;
	switch(Input)
	{
		case 1:
			pClass = "Warrior";
				cout<<"\nYou chose to be a Warrior."<<endl;
				cout<<"\nThe Warrior has the widest array of weapons to choose from in the game, being"<<endl;
				cout<<" able to equip every weapon type in the game except for wands. Warriors,"<<endl;
				cout<<" alongside Paladins, are the only classes that can equip Plate armor, the"<<endl;
				cout<<" heaviest armor type in the game. Warriors can use a wide array of combat"<<endl;
				cout<<" skills but lack any kind of magical abilities.\n\n"<<endl;
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		case 2:
			pClass = "Ranger";
				cout<<"\nYou chose to be a Ranger."<<endl;
				cout<<"\nThe Ranger is based on warriors who use tracking and other wilderness skills"<<endl;
				cout<<" to hunt down their enemies. Rangers can only wield Daggers and Bows, have the"<<endl;
				cout<<" ability to enchant their arrows with magic, and can wear up to Leather armor."<<endl;
				cout<<" Rangers are very agile and have all around stats.\n\n"<<endl;
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		case 3:
			pClass = "Cleric";
				cout<<"\nYou chose to be a Cleric."<<endl;
				cout<<"Most clerics have powers to heal wounds, protect their allies and sometimes"<<endl;
				cout<<" resurrect the dead. Clerics are limited to Cloth armor and must use blunt"<<endl;
				cout<<" weapons such as maces or staves. Clerics primarily use Holy magic to do "<<endl;
				cout<<" damage and heal. Clerics boast high Intelligence and little Strength.\n\n";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		case 4:
			pClass = "Sorcerer";
				cout<<"A Sorcerer is weak in melee combat, but a master of Arcane and Shadow Magic."<<endl;
				cout<<" Sorcerers may cast spells depending on their experience and their Intelligence"<<endl;
				cout<<" level. A Sorcerer may only wear Cloth armor and can only wield Staves."<<endl;
				cout<<" Sorcerers have very high Intelligence but do not have any Strength.\n\n";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		default:
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
				cout<<"\n\nError - Invalid input; only 1, 2, 3, 4, or 5 allowed.\n\n";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
				GnomeClass();
	}
}
void OrcClass()
{
	cout<<" 1 - Warrior\n"
		<<" 2 - Ranger\n"
		<<" 3 - Sorcerer\n\n"
		<<"Class: ";
	int Input;
	cin>>Input;
	switch(Input)
	{
		case 1:
			pClass = "Warrior";
				cout<<"\nYou chose to be a Warrior."<<endl;
				cout<<"\nThe Warrior has the widest array of weapons to choose from in the game, being"<<endl;
				cout<<" able to equip every weapon type in the game except for wands. Warriors,"<<endl;
				cout<<" alongside Paladins, are the only classes that can equip Plate armor, the"<<endl;
				cout<<" heaviest armor type in the game. Warriors can use a wide array of combat"<<endl;
				cout<<" skills but lack any kind of magical abilities.\n\n"<<endl;
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		case 2:
			pClass = "Ranger";
				cout<<"\nYou chose to be a Ranger."<<endl;
				cout<<"\nThe Ranger is based on warriors who use tracking and other wilderness skills"<<endl;
				cout<<" to hunt down their enemies. Rangers can only wield Daggers and Bows, have the"<<endl;
				cout<<" ability to enchant their arrows with magic, and can wear up to Leather armor."<<endl;
				cout<<" Rangers are very agile and have all around stats.\n\n"<<endl;
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		case 3:
			pClass = "Sorcerer";
				cout<<"A Sorcerer is weak in melee combat, but a master of Arcane and Shadow Magic."<<endl;
				cout<<" Sorcerers may cast spells depending on their experience and their Intelligence"<<endl;
				cout<<" level. A Sorcerer may only wear Cloth armor and can only wield Staves."<<endl;
				cout<<" Sorcerers have very high Intelligence but do not have any Strength.\n\n";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		default:
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
				cout<<"\n\nError - Invalid input; only 1, 2, 3, 4, or 5 allowed.\n\n";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
				OrcClass();
	}
}
void HighElfClass()
{
	cout<<" 1 - Warrior\n"
		<<" 2 - Paladin\n"
		<<" 3 - Ranger\n"
		<<" 4 - Sorcerer\n\n"
		<<"Class: ";
	int Input;
	cin>>Input;
	switch(Input)
	{
		case 1:
			pClass = "Warrior";
				cout<<"\nYou chose to be a Warrior."<<endl;
				cout<<"\nThe Warrior has the widest array of weapons to choose from in the game, being"<<endl;
				cout<<" able to equip every weapon type in the game except for wands. Warriors,"<<endl;
				cout<<" alongside Paladins, are the only classes that can equip Plate armor, the"<<endl;
				cout<<" heaviest armor type in the game. Warriors can use a wide array of combat"<<endl;
				cout<<" skills but lack any kind of magical abilities.\n\n"<<endl;
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		case 2:
			pClass = "Paladin";
				cout<<"\nYou chose to be a Paladin."<<endl;
				cout<<"\nThe Paladin is considered to be a melee-oriented hybrid class. They are able"<<endl;
				cout<<" to equip Plate armor. Paladins can use a wide range of weapons as well as"<<endl;
				cout<<" they have the ability to heal themselves as well as their allies. Most"<<endl;
				cout<<" Paladins are normally humans, an all around class, and they are a very"<<endl;
				cout<<" versatile class.\n\n"<<endl;
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		case 3:
			pClass = "Ranger";
				cout<<"\nYou chose to be a Ranger."<<endl;
				cout<<"\nThe Ranger is based on warriors who use tracking and other wilderness skills"<<endl;
				cout<<" to hunt down their enemies. Rangers can only wield Daggers and Bows, have the"<<endl;
				cout<<" ability to enchant their arrows with magic, and can wear up to Leather armor."<<endl;
				cout<<" Rangers are very agile and have all around stats.\n\n"<<endl;
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		case 4:
			pClass = "Sorcerer";
				cout<<"A Sorcerer is weak in melee combat, but a master of Arcane and Shadow Magic."<<endl;
				cout<<" Sorcerers may cast spells depending on their experience and their Intelligence"<<endl;
				cout<<" level. A Sorcerer may only wear Cloth armor and can only wield Staves."<<endl;
				cout<<" Sorcerers have very high Intelligence but do not have any Strength.\n\n";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		default:
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
				cout<<"\n\nError - Invalid input; only 1, 2, 3, 4, or 5 allowed.\n\n";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
				HighElfClass();
	}
}
void NetherClass()
{
	cout<<" 1 - Warrior\n"
		<<" 2 - Paladin\n"
		<<" 3 - Ranger\n"
		<<" 4 - Sorcerer\n\n"
		<<"Class: ";
	int Input;
	cin>>Input;
	switch(Input)
	{
		case 1:
			pClass = "Warrior";
				cout<<"\nYou chose to be a Warrior."<<endl;
				cout<<"\nThe Warrior has the widest array of weapons to choose from in the game, being"<<endl;
				cout<<" able to equip every weapon type in the game except for wands. Warriors,"<<endl;
				cout<<" alongside Paladins, are the only classes that can equip Plate armor, the"<<endl;
				cout<<" heaviest armor type in the game. Warriors can use a wide array of combat"<<endl;
				cout<<" skills but lack any kind of magical abilities.\n\n"<<endl;
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		case 2:
			pClass = "Paladin";
				cout<<"\nYou chose to be a Paladin."<<endl;
				cout<<"\nThe Paladin is considered to be a melee-oriented hybrid class. They are able"<<endl;
				cout<<" to equip Plate armor. Paladins can use a wide range of weapons as well as"<<endl;
				cout<<" they have the ability to heal themselves as well as their allies. Most"<<endl;
				cout<<" Paladins are normally humans, an all around class, and they are a very"<<endl;
				cout<<" versatile class.\n\n"<<endl;
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		case 3:
			pClass = "Ranger";
				cout<<"\nYou chose to be a Ranger."<<endl;
				cout<<"\nThe Ranger is based on warriors who use tracking and other wilderness skills"<<endl;
				cout<<" to hunt down their enemies. Rangers can only wield Daggers and Bows, have the"<<endl;
				cout<<" ability to enchant their arrows with magic, and can wear up to Leather armor."<<endl;
				cout<<" Rangers are very agile and have all around stats.\n\n"<<endl;
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		case 4:
			pClass = "Sorcerer";
				cout<<"A Sorcerer is weak in melee combat, but a master of Arcane and Shadow Magic."<<endl;
				cout<<" Sorcerers may cast spells depending on their experience and their Intelligence"<<endl;
				cout<<" level. A Sorcerer may only wear Cloth armor and can only wield Staves."<<endl;
				cout<<" Sorcerers have very high Intelligence but do not have any Strength.\n\n";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			break;
		default:
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
				cout<<"\n\nError - Invalid input; only 1, 2, 3, 4, or 5 allowed.\n\n";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
				NetherClass();
	}
}
void Start()
{
	cout<<"Voice: It is time..."<<endl;
	system ("pause");
	system ("cls");

Name:	
	cout<<"Voice: What is thy Name?\n\n ";
	cin>>Name;
	
Gender:	
	system ("cls");
	cout<<"Voice: What is thy Gender?\n\n ";
	cin>>Choice;
	switch(Choice)
	{	
		case 1:
			Gender = "Male";
			break;
		case 2:
			Gender = "Female";
			break;
		default:
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
				cout<<"\n\nError - Invalid input; only 1 or 2 allowed.\n\n";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
				goto Gender;
	}

Race:
	system ("cls");
	cout<<"Voice: What is thy Race?\n\n "
		<<" 1 - Human\n"
		<<" 2 - Dwarf\n"
		<<" 3 - Gnome\n"
		<<" 4 - Orc\n"
		<<" 5 - High Elf\n"
		<<" 6 - Nether\n\n"
		<<"Race: ";
	int Race;
	cin>>Race;
	switch(Race)
	{
		case 1:
              Race = "Human";  
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),14);
				cout<<"\nYou picked the ";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				cout<<"Human ";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),14);
				cout<<"race.\n";
				cout<<"\nHumans are characterized by having a large brain relative to body size, with a"<<endl;
				cout<<" particularly well developed neocortex, prefrontal cortex and temporal lobes. "<<endl;
				cout<<" Humans average 6 feet in height and weigh about 180 pounds, with men noticeably";
				cout<<" taller and heavier than women. Humans’ skin ranges from dark to light, and may"<<endl;
				cout<<" have tones of other colors. Their eyes are blue, brown, green, gray, or hazel."<<endl; 
				cout<<" Humans are a fairly young and versatile race. They are of average ability in"<<endl;
				cout<<" every quality. Humans are known for their adaptation and versatility.\n\n";
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
				HumanClass();
				break;
           case 2:
               Race = "Dwarf"; 
			   SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),14);
				cout<<"\nYou picked the ";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),04);	
				cout<<"Dwarf ";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),14);
				cout<<"race.\n";
				cout<<"\nDwarves average four feet in height, with squat, broad bodies. Male dwarves grow";
				cout<<" thick facial hair. Dwarves get along fine with gnomes, who are often regarded"<<endl;
				cout<<" as close cousins of the dwarven race. They are very strong and extremely  "<<endl;
				cout<<" courageous. Dwarves are well-known for their blacksmithing skills and are"<<endl;
				cout<<" very faithful. They are also known to have a love for alcohol.\n\n";
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
				DwarfClass();
				break;
		   case 3:
			   Race = "Gnome"; 
			   SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),14);
			    cout <<"\nYou picked the ";
			    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),05);
			    cout <<"Gnome ";
			    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),14);
			    cout <<"race.\n";
				cout<<"\nThe ingenious Gnomes, masters of technology, are a race of diminutive humanoids.";
				cout<<" Gnomes are small, slight and nifty. They somewhat resemble dwarves, but are"<<endl;
				cout<<" even shorter, not as stocky, and have large heads in proportion to their body."<<endl;
				cout<<" Gnomes are great mechanics and inventors and are known to have eccentric"<<endl;
				cout<<" natures. Gnomes are naturally friendly, highly social and fun-loving people."<<endl;
				cout<<" The Gnomish race is known for their intelligence and their many inventions.\n\n";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
			    GnomeClass();
				break;
		   case 4:
			   Race = "Orc";
			   SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),14);
			    cout<<"\nYou picked the ";
			    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),02);
			    cout<<"Orc ";
			    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),14);
			    cout<<"race.\n";
			    cout<<"\nOrcs are of human shape, of varying size but almost always larger than a Human."<<endl;
				cout<<" They are generally described as brutish, aggressive and repulsive. Orc facial"<<endl;
				cout<<" features tend toward the grotesque (generally a mixture of the ape-like and ,"<<endl;
				cout<<" pig-like) and their skin typically varies from black, grey to green. Orc's are"<<endl;
				cout<<" known for their hatred against the Human race. Orcs are quite strong and excel"<<endl;
				cout<<" in the shamanistic ways.\n\n";
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				system ("pause");
				OrcClass();
				break;
		   case 5:
			   Race = "High Elf"; 
			   SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),14);
			    cout<<"\nYou picked the ";
			    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),11);
			    cout<<"High Elf ";
			    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),14);
			    cout<<"race.\n";
			    cout<<"\nHigh elves have bright hair colors, fair skin, their ears usually point upwards."<<endl;
			    cout<<" Most have brilliantly intense sapphire colored eyes that glow. A High Elf tends to"<<endl;
			    cout<<" be more beautiful and wiser than a Human, with sharper senses and "<<endl;
			    cout<<" perceptions. They are said to be gifted in magic, mentally sharp, and lovers of"<<endl;
			    cout<<" nature, art, and music. They are often skilled Rangers.\n\n";
			    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
			    system ("pause");
			    HighElfClass();
				break;
		   case 6:
			   Race = "Nether";
			   cout<<"You picked the Nether Race.\n";
			   cout<<"\nOriginally, Nether had physical form. The Infernal Legion attacked their"<<endl;
			   cout<<" homeland and ripped the Dark Energy from their bodies. Only their advanced"<<endl;
			   cout<<" technology allowed them to survive - barely - as beings of pure energy. Their"<<endl;
			   cout<<" bodies can take many forms, able to be compacted into small sizes, or expanded"<<endl;
			   cout<<" to their true form: a mass of glowing energy with vaguely distinguishable head,"<<endl;
			   cout<<" eyes, and arms. They most often appear in their specially enchanted wrappings that"<<endl;
			   cout<<" keep their energy forms bound within their humanoid shapes. Other then their dark"<<endl;
			   cout<<" past, not much is known about them.";
			   SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
			   system ("pause");
			   NetherClass();
			break;
           default:
                   SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),12);
				   cout <<"\n\nError - Invalid input; only 1, 2, 3, 4, 5, or 6 allowed.\n\n";
				   SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),15);
				   system ("pause");
				   goto Race;
	}





int main();
{
	Start();

}





Still in the works as well, I would like to know how to make a menu to "double check" your choices before you start the game. When I attempt to do it, I always have the problem of it saying my 'Race is 4' or 'Gender is 2'...

Any help you guys can give would be nice!!

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>