I have been playing an online MUD since 2002 and some of the things have gotten so that I don't like to be on alot anymore and I have decided that I needed to learn code so that I could make a game that my husband and I could play together.
I have been teaching myself through online tutorials and whatnot and have been doing basic coding for a couple of weeks. Things such as "Hello world" Type programs and thought that it might be fun to try and do a basic RPG game. Well I have found myself to have gotten stuck.
I can't get race or class to change from a single letter to the full word, here is the code:
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <time.h>
#include <stdlib.h>
#include <dos.h>
#include <mem.h>
#include <conio.h>
#include <ctime>
#include <windows.h>
#include <string>
using namespace std;
char PlayerName[20];
char PlayerInput;
char Class;
char Fighter; /* I am guessing I need to void this or something??? */
int main()
{
system("color 0A");
cout<<"______________________________________\n";
cout<<"| |\n";
cout<<"| NO NAME YET RPG |\n";
cout<<"|____________________________________|\n";
cout<<""Welcome to my first RPG game. I hope that you enjoy it.\n";
cout << "Perhaps I should explain to you a few things first.\n";
cout << "First off you need to have your capslock on for everything \n";
cout << "in this game as I do not know how to change that but I will \n";
cout << "be working on that as this game progresses. \n";
cout << "Secondly be patient not all areas may be working at the time \n";
cout << "but I will eventually have them up and running. Also I have not \n";
cout << "implimented anything for you to save your character with yet

\n";
cout << "Sorry for the inconvienience. So shall we get started? Y/N \n\n";
cin>>PlayerInput;
if(PlayerInput == 'N')
{
cout <<"Alright you have a nice day then.";
system ("pause");}
else
{
if(PlayerInput == 'Y')
cout <<"Please enter your name: ";
cin>>PlayerName;
cout <<"Great "<<PlayerName<<" now the first thing that we must do\n";
cout <<"is to decide what class you are going to be. To do that \n";
cout <<"please pick from one of the following: \n";
system ("color 03");
cout <<"__________________________________________________________"<<endl;
cout <<"| |"<<endl;
cout <<"| (F)ighter |"<<endl;
cout <<"| ®ogue |"<<endl;
cout <<"| (M)age |"<<endl;
cout <<"| ©leric |"<<endl;
cout <<"|________________________________________________________ |"<<endl;
cin>>Class;
if (Class == 'F')
{
cout<<PlayerName<<" you have chose to become a fighter.\n\n";
}
else
if (Class == 'R')
{
cout<<PlayerName<<" you have chose to become a rogue.\n\n";
}
else
if (Class == 'M')
{
cout<<PlayerName<<" you have chose to become a mage.\n\n";
}
else
if (Class == 'C')
{
cout<<PlayerName<<" you have chose to become a cleric.\n\n";
}
system("color 0A");
system("pause");
system("cls");
cout<<PlayerName<<""<<Class<<" we have now come to the time when you must"<<endl;
cout<<" choose which race you are. Your race will determine your stats."<<endl;
system ("pause");
system ("color 0A");
}
};