Global Variable doesnt work?

Here is a simple version of the problem..(handwritten so there might be errors..)
1
2
3
4
5
6
7
8
9
//global vars/////
char player = 'P';

//main func////
int main()
{
     gameBoard[playerX][playerY] = player;
     displayerboard();
}


When i try doing it like that, where player should be is just a dot from when i filled the gameboard with dots.

BUT, if i do..gameBoard[playerX][playerY] = 'P'; if works fine.

Why is this?
NVM i got it..
Topic archived. No new replies allowed.