Text based rpg help please.

Im making a new text based rpg and im kinda failing and i need some help.
i code in bloodshed c dev. i know it's long but ty if you help

NOTE: i am not finished with fighting or the shop.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
#include <iostream>

using namespace std;

string name;
string age;
string input;
string race;
string FG;
string FHP;
string FAA;
string damage;
int hp = 20;
int SS = 25;
int WS = 10;																//goto
int GS = 55;																//notes:
int DS = 99;
int G = 75;
int slime = 25;
int skeleton = 30;
int boss1 = 100;
int boss2 = 150;
int AA = 15;

int main(int argc, char** argv) 
{
	cout << "Text based Rpg\n";
	
	Starting_menu:
	{
		cout << "/==========================|\n"; // this is the menu
		cout << "|          Menu:           |\n";
		cout << "|                          |\n";
		cout << "| 1.Start                  |\n";
		cout << "| 2.Exit                   |\n";
		cout << "| 3.Instuctsions           |\n";
		cout << "|==========================/\n";
		cin >> input;
		if(input == "Exit"|| input == "exit" || input == "2")
		{
			return 0;
		}
		else if(input == "Instructions" || input == "instructions")
		{
			cout << "You control your movment by typing where\n you want to go.\n";
			cout << "!!! YOU CANOT SAVE YET !!!"; //NOTE: this is a temporary problomb.
			cout << "Press 1";
			cin >> input;
			if(input == "1")
			{
				goto Starting_menu;
			}
			
		}
	}	
	Char_Create: // creating char
	{
			cout << "What is thou name? : ";
			cin >> name;
			cout << "How old? : ";
			cin >> age;
			cout << "Really? and what race? (human): ";
			cin >> race;
			cout << "character created.... loading HUB..\n\n";
			cout << name << " | " << age << " | " << race << " | " << hp << endl;
			cout << "is this Right? :\n";
			cin >> input;
			if(input == "no" || input == "No")
			{
				return 0;
			}
			else if(input == "yes" || input == "Yes")
			{
				goto PLAY_HUB;
			}
    } 
    PLAY_HUB:
    {
    	cout << name << " | " << age << " | " << race << " | " << hp << endl;
    	cout << "\n";
    	cout << " 1. Explore\n";
    	cout << " 2. Shop\n";
    	cout << " 3. Quit\n";
    	cin >> input;
    	if(input == "Quit" || input == "quit")
    	{
    		goto Starting_menu;
    	}
    	else if(input == "Shop" || input == "shop")
    	{
			goto SHOP;
    	}
    	else if(input == "explore" || input == "Explore")
    	{
    		goto FIGHT;
    	}
    }
    SHOP:
    {
        cout << "WHat are ya buyin?\n";
    	cout << "1.Wooden sweord " << WS << endl;
    	cout << "2.Stone sword " << SS << endl;
    	cout << "3.Gold sword " << GS << endl;
    	cout << "4.Dimond sword " << DS << endl;
    	cin >> input;
    	if(input == "wooden sword" || input == "Wooden sword")
    	{
    		FG = G - 10;
    		FAA = AA + 10;
    		cout << "You bought the Wooden sword!";
    		cout << "Return to (menu) or (shop).";
    		cin >> input;
    		if(input == "menu" || input == "Menu")
    		{
    			goto PLAY_HUB;
    		}
    		else if(input == "shop" || input == "Shop")
    		{
    			goto SHOP;
    		}
    	}
    	else if(input == "stone sword" || input == "Stone sword")
    	{
    		FG = G - 25;
 		    FAA = AA + 20;
    		cout << "You bought the Stone sword!";
			cout << "Return to (menu) or (shop).";
    		cin >> input;
    		if(input == "menu" || input == "Menu")
    		{
    			goto PLAY_HUB;
    		}
    		else if(input == "shop" || input == "Shop")
    		{
    			goto SHOP;
    		}   		
    
    	}
    	else if(input == "Gold sword" || input == "gold sword")
    	{
    		FG = G - 55;
    		FAA = AA + 25;
    		cout << "You bought the Gold sword!";
			cout << "Return to (menu) or (shop).";
    		cin >> input;
    		if(input == "menu" || input == "Menu")
    		{
    			goto PLAY_HUB;
    		}
    		else if(input == "shop" || input == "Shop")
    		{
    			goto SHOP;
    		} 
    	}
		else if(input == "Dimond sword" || input == "dimond sword")
    	{
           	FG = G - 99;
    		FAA = AA + 35;
    		cout << "You bought the Dimond Sword!";
			cout << "Return to (menu) or (shop).";
    		cin >> input;
    		if(input == "menu" || input == "Menu")
    		{
    			goto PLAY_HUB;
    		}
    		else if(input == "shop" || input == "Shop")
    		{
    			goto SHOP;
    		} 
    	}

    }
    FIGHT:
    {
    	cout << "YOU ENCOUNTER AN ENEMY!";
    	cout << "\n";
    	cout << name << " | " << age << " | " << race << " | " << hp << endl;
    	cout << "\n";
    	cout << "slime hp: " << slime << endl;
    	cout << "\n";
    	cout << "1. attack";
    	cout << "2. Run";
    	cin >> input;
    	if(input == "attack" || input == "Attack")
    	{
    		damage = slime - FAA;
    		cout << "you did " << damage << endl;
    		cout << "Press 1";
    		cin >> input;
    		if(input == "1" || input == "one")
    		{
    			goto FIGHT2;
    		}
    		else if(slime == 0)
    	}
    }
    FIGHT2;
    
    
}
First and foremost - don't use "goto" in C++. Ever. It's problematic, often dangerous, and there is almost always a much better way of structuring your code. There are rare circumstances in which it's appropriate to use "goto", but unless you're experienced enough to understand exactly why it's a dangerous thing to do - and clearly you're not - then you shouldn't use it.

Learn how to use the basic control structures that C++ provides:

http://www.cplusplus.com/doc/tutorial/control/
Definitely listen to MikeyBoy's post. He raises some very important points. The only thing to add is to suggest using functions and classes to make this game, which will make the task (at least) 10x easier. I'd definitely recommend learning about all this and then starting an RPG, as opposed to struggling through a badly designed RPG and then learning everything that would have made it easier afterwards.
^^ What he said. Until you learn basic functions and control structures a text based RPG is just going to waste your time and instill bad habits. Wait until you learn some OOP (Object Oriented) and then you can do it right.

Topic archived. No new replies allowed.