ok im going to post some of my code the part im asking about so then you can also help me find some erros. theres a few...
Code:
#include <iostream>
#include <stdlib.h>
#include <conio.h>
using namespace std;
void map();
//int movement();
//int x(1);
//int y(1);
int main()
{
map();
system("PAUSE");
return 0;
}
void map()
{
char armap[26][]={
"+oooooooooooooooooooooooo+",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| |",
"| 0 |",
"+oooooooooooooooooooooooo+"
};
armap[x][y] = "8";
for(int i =0; i <= 26; i++)
{
for(int j = 0; j <= 12; j++)
{
cout<<armap[i][j];
}
cout<<endl;
}
// movement();
}
/*int movement()
{
char direction;
cout<<"use 'w' for up 'a' for left 's' for down and 'd' for right."<<endl;
direction=getch();
if (direction==('w' || 'W'))
{
y--;
map();
}
else if (direction==('s' || 'S'))
{
y++;
map();
}
else if (direction==('a' || 'A'))
{
x--;
map();
}
else if (direction==('d' || 'D'))
{
x++;
map();
}
else if (direction==('q' || 'Q'))
{
return(0);
}
else
{
movement();
}
}
there are alot of errors regarding the array (there is another post just on this problem) and all the movement function is commented out because im still weeding out other problems