/signcheck Error Help
#5

ah duh... thanks but i'm having another problem with this snipet

pawn Код:
public SignCheck()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        new randcheck = 1000 + random(8999);//minimum 1000  max 9999 //giving one at the start

        PlayerInfo[i][pCheckNum] = randcheck;
        PlayerInfo[i][pPayPaid] = 0;
        PayCheckNum[i] = randcheck;

        new entry[200];

        format(entry, sizeof(entry), "PAYDAY: Do /signcheck %i", randcheck);
        SendClientMessage(i, COLOR_LIGHTBLUE, entry);

    }

    SetTimer("LateCheck", 300000, false);

    return 1;
}
it doesn't seem to store the pchecknum so that i can use my /signcheck command which looks like this

pawn Код:
if(strcmp(cmd, "/signcheck", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "USAGE: /signcheck [Check #]");
                return 1;
            }
           
            new Check;
            Check = strval(tmp);
           
            if(Check == PayCheckNum[playerid])
            {
                if(PlayerInfo[playerid][pPayPaid] == 0)
                {
                    PayDay();
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "The bank won't accept that check your too late");
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "That isn't the correct Check number");
            }
        }
        return 1;
    }
i think i've narrowed the problem down to where my signcheck function doesn't store the random check number to PlayerInfo. So i created another value which is the PayCheckNum[MAX_PLAYERS] but it still doesn't work.
Reply


Messages In This Thread
/signcheck Error Help - by Qeux - 19.03.2011, 07:27
Re: /signcheck Error Help - by Norck - 19.03.2011, 07:52
Re: /signcheck Error Help - by Qeux - 19.03.2011, 17:13
Re: /signcheck Error Help - by Norck - 19.03.2011, 18:15
Re: /signcheck Error Help - by Qeux - 19.03.2011, 19:26

Forum Jump:


Users browsing this thread: 2 Guest(s)