keeps telling me i didn't set record..
#1

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
Reply
#2

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?
Reply
#3

i see, thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)