0.3x Compilation Error - Include
#1

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
Reply
#2

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

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".
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)