Error link-2019, 1120 c++ Text based Adventure Game.

Hi Guys, was wondering if you could help me out with my code. Doing a little project fro uni and stuck on these 2 errors. If anyone could please shed some light on what i could do that would be amazing. Its a text based adventure game

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
  #include "stdafx.h"
#include <iostream>
#include <ctime>
#include <string>
using namespace std;
int ActionChoice;
int Crew, Strength, Y, X;
string flee, rifle, Choice;
void FunctionNorthPath(int Crew = Y, int Strength = X);
int main()
{

	int xran;
	srand(time(0));
	xran = rand() % 10 + 1;

	//Intro text banner
	cout << "\t\t\t*__________________________*\n"
		<< "\t\t\t          Arrival				\n"
		<< "\t\t\t*__________________________*\n\n\n\n"


		//
		<< "Proffessor Curtis and the team arrive at the temple, There seems to be multiple paths to choose from \n" << " .There are 3 different entrances to this temple, One to the North, One to the West and One to the East. you should choose wisely\n"
		<< " Path 1 Has a message etched onto the wall, What road has the most ghosts haunting it ?. \n"
		<< " Path 2 has no message, but a monstrous noice is being created inside. .\n"
		<< " Path 3 has a message etched onto the wall, Enter the dangerous game .\n"
		<< " Where would you like to search? (It is reccomended to search each area)\n"
		<< "North - Path 1\n"
		<< "East - Path 2\n"
		<< "West - Path 3\n"
		<< "Please enter either North,East or West\n\n";
	cin >> Choice;
	if (Choice == "North")
	{


		FunctionNorthPath();
	}

	void FunctionNorthPath();
	{
		int X, Y;
		int xran;
		srand(time(0));
		xran = rand() % 10 + 1;

		cout << "\t\t\t*__________________________*\n"
			<< "\t\t\t         North Entrance	    \n"
			<< "\t\t\t*__________________________*\n\n\n\n"

			<< "You walk up to the entrance to the path, Look someone has made an etching in the stone.\n" << "Hmm it seems to be some kind of joke, i wonder what the punch line is \n" << "You walk down tha path and see a rifle on the floor.\n\n" << "you pick the rifle up?\n\n"
			<< "You continue down the path until you get to a rabid beast called a slardar, you need to shoot the beast before it kills one of the crew, or you should try to hide\n\n"
			<< "Do you want to 1.shoot the beast (70% kill chance with rifle) or 2. Try and hide in the darkness (50% chance of 1 of crew getting caught).\n"
			<< "please enter either 1 for rifleshot or 2 for hide\n\n";

		cin >> ActionChoice;
		if (ActionChoice == 1)
			{
			cout << "you rolled a" << xran;
			}
			if (xran = 1, 2, 3, 4, 5, 6, 7)
				{
				cout << "Clean kill on slardar, you may now walk into the room that he was guarding. To your east you have a treasure chest and to you west you have a door, Where would you like to search? (It is reccomended to search each area)\n"
					<< "East - Treasure chest\n"
					<< "West - Door\n";

				//if (Choice == "West")
				//{
				//	FunctionWestPath();
				//}
			}

			else if (xran = 8, 9, 10)
			{
				cout << "Slardar has killed one of your most faithful companions :(, The group has now fleed to the starting area" << X--;
				return{ X };

			}
			else if (ActionChoice == 2)
			{
				cout << "The crew has now fled to the starting area" << Y - 5;
				return{ Y };

				{

					system("pause");

				}



			}
		}
Topic archived. No new replies allowed.