IsNumeric Problem !! Fast help
#1

Error
pawn Код:
C:\Users\CraTzy\Desktop\LVDM\gamemodes\LVDM.pwn(6262) : error 021: symbol already defined: "IsNumeric"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
The line of error
pawn Код:
stock IsNumeric(const string[])
{
    new length = strlen(string);
    if(!length) return false;
    for(new i = 0; i < length; i++)
    {
        if(string[i] > '9' || string[i] <'0') return false;
    }
    return true;
}
This is my 2nd IsNumeric but idk how to put both on 1 Stock
pawn Код:
stock IsNumeric(const string[])
{
    for(new i=0; string[i]; i++)
    {
        if(string[i] < '0' || string[i] > '9') return 0;
    }
    return 1;
}
+Rep who help me

NVM ~FIXED ~ by myself

pawn Код:
stock IsNumeric(const string[])
{
    for(new i=0; string[i]; i++)
    {
        if(string[i] < '0' || string[i] > '9') return 0;
    }
    new length = strlen(string);
    if(!length) return false;
    for(new i = 0; i < length; i++)
    {
        if(string[i] > '9' || string[i] <'0') return false;
    }
    return true;

}
Reply


Messages In This Thread
IsNumeric Problem !! Fast help - by Toxik - 09.05.2015, 17:51
AW: IsNumeric Problem !! Fast help - by Mencent - 09.05.2015, 17:53
Re: IsNumeric Problem !! Fast help - by ihatetn931 - 09.05.2015, 17:54
Re: IsNumeric Problem !! Fast help - by Sawalha - 09.05.2015, 17:54
Re: IsNumeric Problem !! Fast help - by J4Rr3x - 09.05.2015, 17:55
AW: IsNumeric Problem !! Fast help - by Mencent - 09.05.2015, 17:57
Re: IsNumeric Problem !! Fast help - by sammp - 09.05.2015, 18:02
Re: IsNumeric Problem !! Fast help - by SickAttack - 09.05.2015, 18:23
Re: IsNumeric Problem !! Fast help - by Vince - 09.05.2015, 18:27
Re: IsNumeric Problem !! Fast help - by sammp - 09.05.2015, 18:34

Forum Jump:


Users browsing this thread: 1 Guest(s)