ERROR:function "IsNumeric" is not implemented
#1

Hi SA-MP Community again,
I have some errors and warnings here please check this out.
pawn Код:
E:\Faisal\Servers\Orders\thefatshizms-RP\server\gamemodes\RP.pwn(943) : error 004: function "IsNumeric" is not implemented
E:\Faisal\Servers\Orders\thefatshizms-RP\server\gamemodes\RP.pwn(966) : error 004: function "IsNumeric" is not implemented
E:\Faisal\Servers\Orders\thefatshizms-RP\server\gamemodes\RP.pwn(1081) : warning 204: symbol is assigned a value that is never used: "CluckinTimer"
E:\Faisal\Servers\Orders\thefatshizms-RP\server\gamemodes\RP.pwn(1070) : warning 204: symbol is assigned a value that is never used: "WSPT"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
pawn Код:
dcmd_deposit(playerid,params[])
{
new index = 0;
new tmp[255];
new string[255];
new moneys;
if(GetPlayerInterior(playerid) != 10) return SendClientMessage(playerid,COLOR_BRIGHTRED,"You Must Be at The BANK!");
tmp = strtok(params, index);
[B]line 943 : [/B] if(!strlen(tmp) || !IsNumeric(tmp)) return SendClientMessage(playerid,COLOR_BRIGHTRED,"[ERROR]: Usage: /deposti amount");
moneys = strval(tmp);
if(moneys < 1) return SendClientMessage(playerid,COLOR_BRIGHTRED,"Invalid Amount!!");
if(GetPlayerMoney(playerid) < moneys)
{
moneys = GetPlayerMoney(playerid);
}
PlayerBank[playerid] += moneys;
format(string,sizeof(string),"You Have Deposti $%d. Your Current Balance is $%d",moneys,PlayerBank[playerid]);
SendClientMessage(playerid,COLOR_GREEN,string);
GivePlayerMoney(playerid,-moneys);
if(PLAYERLIST_authed[playerid] == 1)
{
dUserSetINT(PlayerName(playerid)).("money",GetPlayerMoney(playerid));
dUserSetINT(PlayerName(playerid)).("bank",PlayerBank[playerid]);
}
return 1;
}

if (strcmp("/ckjob", cmdtext, true, 10) == 0)
    {
        if(GetPlayerInterior(playerid) != 9) return SendClientMessage(playerid,COLOR_BRIGHTRED,"You Must Be At Cluckin Bell!");
        if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_BRIGHTRED,"You Must Be On Foot!");
[B]Line 1081:[/B]CluckinTimer = SetTimerEx("CluckinJob",60000,true,"i",playerid);
        SetPlayerSkin(playerid,167);
        SendClientMessage(playerid,COLOR_YELLOW,"Congratulations now you work at Cluckin-Bell... you will earn 1500$ every 60  Seconds");
        return 1;
    }
Reply
#2

Get the IsNumeric function then?
Reply
#3

LOL i forgot that dude.
What about this?
Its confusing me a lto.

pawn Код:
E:\Faisal\Servers\Orders\thefatshizms-RP\server\gamemodes\RP.pwn(1081) : warning 204: symbol is assigned a value that is never used: "CluckinTimer"
E:\Faisal\Servers\Orders\thefatshizms-RP\server\gamemodes\RP.pwn(1070) : warning 204: symbol is assigned a value that is never used: "WSPT"
Reply
#4

Delete the definitions of both "Cluckintimer" and "WSPT" from your script.
Reply
#5

Quote:
Originally Posted by jameskmonger
Посмотреть сообщение
Delete the definitions of both "Cluckintimer" and "WSPT" from your script.
Done bro thnx +rep to u!
Reply
#6

Quote:
Originally Posted by Faisal_khan
Посмотреть сообщение
Done bro thnx +rep to u!
You're welcome, thanks
Reply
#7

Quote:
Originally Posted by jameskmonger
Посмотреть сообщение
You're welcome, thanks
Hey can u explain me IsNumeric again i just dont remember it.
Reply
#8

Quote:
Originally Posted by Faisal_khan
Посмотреть сообщение
Hey can u explain me IsNumeric again i just dont remember it.
What do you mean? Which part do you not understand?
Reply
#9

[QOUTE]
Get the IsNumeric function
[/QOUTE]
This part.
Reply
#10

Add this into your script:
pawn Код:
stock IsNumeric(const string[]) //By Jan "DracoBlue" Schьtze (edited by Gabriel "Larcius" Cordes
{
    new length=strlen(string);
    if(length==0)
    {
        return 0;
    }
    for (new i=0; i<length; i++)
    {
        if (!((string[i] <= '9' && string[i] >= '0') || (i==0 && (string[i]=='-' || string[i]=='+'))))
        {
            return false;
        }
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)