Problem verification ~x(
#1

pawn Код:
forward SecundeLeftUpdater();
public SecundeLeftUpdater()
{
    new
        string[ 10 ];
    switch(SecundeLeft)
    {
        case 00:
        {
            SecundeLeft = 60;
            MinuteLeft--;
            format(string, 10, "0%d", MinuteLeft);
            TextDrawSetString(MinLeft, string);
            UltimateSecond = 0;
        }
        case 10:
        {
            SecundeLeft = 10;
            UltimateSecond = 1;
        }
    }
    if(UltimateSecond == 1)
    {
        SecundeLeft--;
        format(string, 10, "%0d", SecundeLeft);
        TextDrawSetString(SecLeft, string);
        return 1;
    }
    SecundeLeft--;
    format(string, 10, "%d", SecundeLeft);
    TextDrawSetString(SecLeft, string);
    return 1;
}
When arrive at 9 second, is 02:9.
I want 2:09
Reply
#2

pawn Код:
SecundeLeft--;
format(string, 10, "0%d", SecundeLeft);
TextDrawSetString(SecLeft, string);
return 1;
Try this.
Reply
#3

), my mistake ) in the format is %0d ) wtf )?
Solved.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)