Wrong value seen?
#1

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:

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...?
Reply


Messages In This Thread
Wrong value seen? - by Mado - 22.01.2013, 06:32
Re: Wrong value seen? - by antonio112 - 22.01.2013, 06:38
Re: Wrong value seen? - by Mado - 22.01.2013, 07:14
Re: Wrong value seen? - by antonio112 - 22.01.2013, 07:34

Forum Jump:


Users browsing this thread: 1 Guest(s)