22.01.2013, 06:32
Hello,
I'm making something, but at some if/elseif statement there seems to be a little problem.
First the player types a command and "pGambleProgress" is set to 1. After some other dialogs he comes to a point where a draw is done, and one extra pGameProgress is added. That's in this code:
Now 1 + 1 = 2, but in the script it's seen as "above 4" as the else statement is triggered. How...?
I'm making something, but at some if/elseif statement there seems to be a little problem.
First the player types a command and "pGambleProgress" is set to 1. After some other dialogs he comes to a point where a draw is done, and one extra pGameProgress is added. That's in this code:
pawn Код:
PlayerInfo[playerid][pGambleProgress] += 1;
if(PlayerInfo[playerid][pGambleProgress] < 4)
{
format(add, sizeof(add), "{DEF7E4}Slot 1: %s\n{DEF7E4}Slot 2: %s\n{DEF7E4}Slot 3: %s\n{DEF7E4}Slot 4: %s", slot1, slot2, slot3, slot4);
strcat(dialog, add);
ShowPlayerDialog(playerid, GAMBLE_LOCK, DIALOG_STYLE_LIST, "Slot Machine", dialog, "Lock", "Don't lock");
}
else //END OF GAMBLE
{
SendClientMessageEx(playerid, COLOR_YELLOW, "else statement triggered");
}
Now 1 + 1 = 2, but in the script it's seen as "above 4" as the else statement is triggered. How...?