SA-MP Forums Archive
keeps telling me i didn't set record.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: keeps telling me i didn't set record.. (/showthread.php?tid=201492)



keeps telling me i didn't set record.. - Seven. - 21.12.2010

I have set recordtimeminute to 10, recordtimeseconds to 0.

gCounting[0] = minutes, gCounting[1] = seconds.
** each 60 seconds, gCounting[0] will ++;

pawn Код:
if(gCounting[0] < dini_Int(str,"recordtimeminute") && gCounting[1] < dini_Int(str,"recordtimeseconds"))
    {
        if(gCounting[0] == dini_Int(str,"recordtimeminute") && gCounting[1] < dini_Int(str,"recordtimeseconds"))
        {
    //setting record etc.
        }
    }
    else
    {
    SendClientMessage(playerid, white, "Sorry, you haven't set a new record! Next time more luck.");
    }
}
My problem is, everytime i finish it tell's me i didn't have set a new record while my time is inside the 10 minutes. :S


Re: keeps telling me i didn't set record.. - JaTochNietDan - 21.12.2010

Well take a look at your if statement.

pawn Код:
gCounting[1] < dini_Int(str,"recordtimeseconds")
That will never be possible, since gCounting[1] is equal to seconds, and you have recordtimeseconds set to 0, how could gCounting[1] ever possibly be less than recordtimeseconds?


Re: keeps telling me i didn't set record.. - Seven. - 21.12.2010

i see, thanks!