SA-MP Forums Archive
error 021: symbol already defined: "ReturnUser" - 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: error 021: symbol already defined: "ReturnUser" (/showthread.php?tid=467069)



error 021: symbol already defined: "ReturnUser" - biduaxe - 01.10.2013

i have delete it but my command it erorr
HTML Code:
C:\Users\vpns13\Desktop\[update] VIP\gamemodes\vnpla_LV.pwn(117123) : error 021: symbol already defined: "ReturnUser"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
my line
HTML Code:
ReturnUser(text[]) {

	new
		strPos,
		returnID = 0,
		bool: isnum = true;

	while(text[strPos]) {
		if(isnum) {
			if ('0' <= text[strPos] <= '9') returnID = (returnID * 10) + (text[strPos] - '0');
			else isnum = false;
		}
		strPos++;
	}
	if (isnum) {
		if(IsPlayerConnected(returnID)) return returnID;
	}
	else {

		new
			sz_playerName[MAX_PLAYER_NAME];

		foreach(new i: Player) {
			GetPlayerName(i, sz_playerName, MAX_PLAYER_NAME);
			if(!strcmp(sz_playerName, text, true, strPos)) return i;
		}
	}
	return INVALID_PLAYER_ID;
}



Re: error 021: symbol already defined: "ReturnUser" - xganyx - 01.10.2013

don't tell me you have this
pawn Code:
#define ReturnUser
or this
pawn Code:
new ReturnUser



Re: error 021: symbol already defined: "ReturnUser" - Konstantinos - 01.10.2013

You probably have the function twice. Remove the one from line 117123.


Respuesta: error 021: symbol already defined: "ReturnUser" - DanDRT - 01.10.2013

remove one "ReturnUser"


Re: error 021: symbol already defined: "ReturnUser" - biduaxe - 01.10.2013

How to remote it i can't


Re: error 021: symbol already defined: "ReturnUser" - Konstantinos - 01.10.2013

Quote:
Originally Posted by biduaxe
View Post
How to remote it i can't
Go to line 117123 and select this part (with the mouse - hold left click and move it down):
pawn Code:
ReturnUser(text[]) {

    new
        strPos,
        returnID = 0,
        bool: isnum = true;

    while(text[strPos]) {
        if(isnum) {
            if ('0' <= text[strPos] <= '9') returnID = (returnID * 10) + (text[strPos] - '0');
            else isnum = false;
        }
        strPos++;
    }
    if (isnum) {
        if(IsPlayerConnected(returnID)) return returnID;
    }
    else {

        new
            sz_playerName[MAX_PLAYER_NAME];

        foreach(new i: Player) {
            GetPlayerName(i, sz_playerName, MAX_PLAYER_NAME);
            if(!strcmp(sz_playerName, text, true, strPos)) return i;
        }
    }
    return INVALID_PLAYER_ID;
}
and press Backspace or Delete key.


Re: error 021: symbol already defined: "ReturnUser" - biduaxe - 01.10.2013

But my command like/b , /enter , /exit are erorr


Re: error 021: symbol already defined: "ReturnUser" - xganyx - 01.10.2013

Hey are you vietnamese?...


Re: error 021: symbol already defined: "ReturnUser" - biduaxe - 01.10.2013

Yes i am from vietnam sr my bad englist


Re: error 021: symbol already defined: "ReturnUser" - biduaxe - 01.10.2013

Please help me