Simple RPG (What Is Wrong?)

Help... What Did I Do Wrong In My Program?
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
#include <iostream>
#include <windows.h>

using namespace std;

char Map [10] [10] = {"##########",
                      "#        #",
	              "#        #",
	              "#        #",
		      "#        #",
       		      "#        #",
		      "#        #",
	              "#        #",
		      "#@       #",
		      "##########"};

int GameSpeed = 100;
int Level = 0;		  
bool stopgame false;

int main ()
{

  while(stopgame == false)
  {
    system ("cls");
    for (int y = 0; y < 10; y++)
	{
	  cout << Map [y] << endl;
	}
	for (int y = 0; y<10; y++)
	{
	  for (int x = 0; x<10; x++)
	  {
	    switch (Map[y][x])
		{
		  casr '@':
		  {
		    if (GetAsyncKeyState (VK_UP) != 0)
			{
			  int y2 = (y-1);
			  
			  switch ((Map[y2][x]))
			  {
			    case ' ':
				{
				  Map[y][x] = ' ';
				  y -= 1;
				  Map[y2][x] = '@';
				}break;
			  }
			}
			if(GetAsyncKeyState (VK_DOWN) != 0)
			{
			  int y2 = (y + 1);
			  
			  switch ((Map[y2][x]))
			  {
			    case
				{
				  Map[y][x] = ' ';
				  y += 1;
				  Map[y2][x] = '@';
				}
			  }
			}
		  }
		}break;
	  }
	}
	Sleem(Gamespeed)
  }
}
Mind posting compiler errors?
They should be very descriptive.
Last edited on
15 C:\Dev-Cpp\bin\RPGgame.cpp initializer-string for array of chars is too long
19 C:\Dev-Cpp\bin\RPGgame.cpp expected init-declarator before "false"
19 C:\Dev-Cpp\bin\RPGgame.cpp expected `,' or `;' before "false"
C:\Dev-Cpp\bin\RPGgame.cpp In function `int main()':
24 C:\Dev-Cpp\bin\RPGgame.cpp `stopgame' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
37 C:\Dev-Cpp\bin\RPGgame.cpp `casr' undeclared (first use this function)
37 C:\Dev-Cpp\bin\RPGgame.cpp expected `;' before '@'
71 C:\Dev-Cpp\bin\RPGgame.cpp `Gamespeed' undeclared (first use this function)
71 C:\Dev-Cpp\bin\RPGgame.cpp `Sleem' undeclared (first use this function)
72 C:\Dev-Cpp\bin\RPGgame.cpp expected `;' before '}' token
There--------------------------------------------------------------------------------------------------------
> 15 C:\Dev-Cpp\bin\RPGgame.cpp initializer-string for array of chars is too long
remember that string literals are null terminated

> 19 C:\Dev-Cpp\bin\RPGgame.cpp expected init-declarator before "false"
> 19 C:\Dev-Cpp\bin\RPGgame.cpp expected `,' or `;' before "false"
> 24 C:\Dev-Cpp\bin\RPGgame.cpp `stopgame' undeclared (first use this function)
bool stopgame = false;

> 37 C:\Dev-Cpp\bin\RPGgame.cpp `casr' undeclared (first use this function)
> 37 C:\Dev-Cpp\bin\RPGgame.cpp expected `;' before '@'
.oi read what you wrote

> 71 C:\Dev-Cpp\bin\RPGgame.cpp `Gamespeed' undeclared (first use this function)
case sensitive
Can You Copy Paste The Code With All The Changes
Topic archived. No new replies allowed.