SA-MP Forums Archive
0.3x Compilation Error - Include - 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)
+--- Thread: 0.3x Compilation Error - Include (/showthread.php?tid=412143)



0.3x Compilation Error - Include - DJ_Shocker - 01.02.2013

I'm not sure what the deal is. I'm trying to compile our script for 0.3x and only ONE error comes up:

pawn Код:
../include/gl_common.inc(194) : error 021: symbol already defined: "ReturnUser"
Now the line that it's talking about:

pawn Код:
#define RETURN_USER_FAILURE -1
#define RETURN_USER_MULTIPLE -2

stock ReturnUser(text[])
{//Line 194 is right here
    new pos = 0;
    new userid = RETURN_USER_FAILURE;
       
    while(text[pos] < 0x21) { // Strip out leading spaces
        if(text[pos] == 0) return RETURN_USER_FAILURE; // No passed text
        pos++;
    }
       
    if(isNumeric(text[pos])) { // Check whole passed string
        userid = strval(text[pos]);
        if(userid >=0 && userid < MAX_PLAYERS)
        {
            if(IsPlayerConnected(userid)) return userid;
            return RETURN_USER_FAILURE;
        }
    }
I didn't have this issue in 0.3e. No errors. No warnings. Script compiles perfectly


Re: 0.3x Compilation Error - Include - iGetty - 01.02.2013

It's all in the error really. That's in an include, try checking your script for ReturnUser, or delete it from the include.


Re: 0.3x Compilation Error - Include - Cameryn - 01.02.2013

You don't need "ReturnUser" if you are already including "utils.inc" which has the "ReturnUser" function, so you can just remove the "ReturnUser" function on your "gl_common.inc".