Unnormal problem

Hey guys, thx for reading this.
So, i got a problem that are driving me crazy >.<
The code is:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{//comment
	if(entrada_usuario == SAVE_GAME)
	{
		save_game();
		respondeu = true;
	}

	if(entrada_usuario == LOAD_GAME);
	{
		load_game();
		respondeu = true;
	}

	if(entrada_usuario == QUIT_GAME)
	{
		EM_JOGO = false;
		respondeu = true;
	}
}

the variables are in portuguese, but u can understain ...
SAVE_GAME = "save_game"
LOAD_GAME = "load_game"
QUIT_GAME = "quit_game"
So, what is happning is: when entrada_usuario = "quit_game" the code executes the load_game() AND the EM_JOGO = false... What im saying is that it do 2 if at the same time with different things...
I really dun know what is happining here...
Im using MS Visual Studio 2010
note: entrada_usuario, QUIT_GAME, SAVE_GAME and LOAD_GAME = char[];
Last edited on
line 8. get rid of that semicolon
Topic archived. No new replies allowed.