SA-MP Forums Archive
Problem - "IsNum" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem - "IsNum" (/showthread.php?tid=165383)



Problem - "IsNum" - Ed2ka49 - 04.08.2010

Well, I have bought the Everlast Gaming gamemode, and the scripter/seller fucked me up and won't help me.
I'm trying to compile the gamemode, and I get 8 erros, all of them are : "undefined symbol "IsNum".
I've tried to define it by addine "new IsNum;" on the top of the script, but it gives me 4 errors:
"invalid function call, not a valid address"
"expected token: ";", but found ")""
"invalid expression, assumed zero"
"too many error messages on one line"

Can somebody help me please? I will be really sad if I will find out that I have lost some money on script with doesn't even work.


Re: Problem - "IsNum" - Mimic - 04.08.2010

Define them with #define? If it sais it's undefined then you'll need to do

#define IsNum


Re: Problem - "IsNum" - [L3th4l] - 04.08.2010

Um, is it the same as IsNumeric?

Not sure, but here is the IsNumeric

pawn Код:
IsNumeric(const string[])
{
    for (new i = 0, j = strlen(string); i < j; i++)
    {
        if (string[i] > '9' || string[i] < '0') return 0;
    }
    return 1;
}



Re: Problem - "IsNum" - Ed2ka49 - 04.08.2010

Well, I deleted the "New IsNum;", and "#define IsNum" it, now I get a few errors:

error 033: array must be indexed (variable "strrest")
error 033: array must be indexed (variable "cmd")
error 033: array must be indexed (variable "cmd")
error 033: array must be indexed (variable "cmd")
error 033: array must be indexed (variable "cmd")
error 033: array must be indexed (variable "cmd")
error 033: array must be indexed (variable "cmd")
error 033: array must be indexed (variable "weapon")

Thank you for your quick respond, but what should I do now?


Re: Problem - "IsNum" - Mimic - 04.08.2010

That's weird, the gamemode said it wasn't defined? now you try and define it, and you get more errors

EDIT : Show the errors, in a [code] format and show the lines where the errors are in. a [code] format also please.


Re: Problem - "IsNum" - Ed2ka49 - 04.08.2010

Yes I do. Can somebody else please give a look on it, I really need to fix these errors.


Re: Problem - "IsNum" - Daren_Jacobson - 04.08.2010

Lol mimic you fail, un-defined means not in your script, in other words you need to have a function called IsNum in your script.
pawn Код:
IsNumeric(const string[])
{
    for (new i = 0, j = strlen(string); i < j; i++)
    {
        if (string[i] > '9' || string[i] < '0') return 0;
    }
    return 1;
}



Re: Problem - "IsNum" - ScottCFR - 04.08.2010

Isn't there something like #undefine maybe?

May be another language I am learning, but I'm pretty sure it's pawn xD


Re: Problem - "IsNum" - Ed2ka49 - 04.08.2010

Thank you very much! No errors