[Plugin] strftime
#19

Crash fixed on pawn!
pawn Код:
public OnFilterScriptInit()
{
new time[10];
strftime("%p %n",time);
print(time);
/*
new time[10];
if(strftimex("Son las %I:%M %p",time))print(time);*/

return 1;
}

stock strftimex(formato[],time[])
{
    new Invalid;
    for(new i;i<strlen(formato);i++)
    {
        if(formato[i] == '%')
        {

            if(formato[i+1] == 'a')continue;
            else if(formato[i+1] == 'A')continue;
            else if(formato[i+1] == 'b')continue;
            else if(formato[i+1] == 'B')continue;
            else if(formato[i+1] == 'c')continue;
            else if(formato[i+1] == 'd')continue;
            else if(formato[i+1] == 'H')continue;
            else if(formato[i+1] == 'I')continue;
            else if(formato[i+1] == 'j')continue;
            else if(formato[i+1] == 'm')continue;
            else if(formato[i+1] == 'M')continue;
            else if(formato[i+1] == 'p')continue;
            else if(formato[i+1] == 'S')continue;
            else if(formato[i+1] == 'U')continue;
            else if(formato[i+1] == 'w')continue;
            else if(formato[i+1] == 'W')continue;
            else if(formato[i+1] == 'x')continue;
            else if(formato[i+1] == 'X')continue;
            else if(formato[i+1] == 'y')continue;
            else if(formato[i+1] == 'Y')continue;
            else if(formato[i+1] == 'Z')continue;
            else
            {
            Invalid=1;
            }
        }
    }
    if(!Invalid)return strftime(formato,time), 1;
    else print("STRFTIME: Specifier invalid!");
    return 0;
}
Reply


Messages In This Thread
strftime - by Jovanny - 09.10.2011, 05:07
Re: strftime - by Kar - 09.10.2011, 05:10
Re: strftime - by HyperZ - 09.10.2011, 05:56
Respuesta: Re: strftime - by Jovanny - 09.10.2011, 05:59
Re: strftime - by [L3th4l] - 09.10.2011, 06:00
Re: strftime - by Flake. - 09.10.2011, 06:41
Respuesta: Re: strftime - by Jovanny - 09.10.2011, 06:55
Re: strftime - by Zh3r0 - 09.10.2011, 07:48
Re: strftime - by thiaZ_ - 09.10.2011, 08:15
Re: strftime - by GangsTa_ - 09.10.2011, 08:17
Re: strftime - by wups - 09.10.2011, 08:44
Re: strftime - by AndreT - 09.10.2011, 09:14
Re: strftime - by TheArcher - 09.10.2011, 09:38
Re: strftime - by CyNiC - 09.10.2011, 13:41
Respuesta: Re: strftime - by Jovanny - 09.10.2011, 18:58
Re : strftime - by Naruto_Emilio - 09.10.2011, 21:58
Respuesta: Re: strftime - by Jovanny - 10.10.2011, 03:18
AW: strftime - by olaf137 - 10.10.2011, 07:14
Respuesta: strftime - by Jovanny - 11.10.2011, 04:50
Re: strftime - by Ballu Miaa - 10.09.2012, 18:21
Re: strftime - by Kaperstone - 10.09.2012, 18:47
Respuesta: Re: strftime - by CaptainMactavish - 10.09.2012, 23:43
Re: strftime - by Stronach - 27.09.2012, 20:35

Forum Jump:


Users browsing this thread: 1 Guest(s)