PDA

View Full Version : error 025/error 021 Help Please


PiLLoW
09/07/2015, 05:05 AM
error 025: function heading differs from prototype
error 021: symbol already defined: "ReturnUser"
// ReturnUser (By ******)
stock ReturnUser(playerid, text[])//http://pyrokid.pastebin.com/f57277676
{
new pos = 0,string[256];
while (text[pos] < 0x21) // Strip out leading spaces
{
if (text[pos] == 0) return INVALID_PLAYER_ID; // No passed text
pos++;
}
new userid = INVALID_PLAYER_ID;
if (isNumeric(text[pos])) // Check whole passed string
{
// If they have a numeric name you have a problem (although names are checked on id failure)
userid = strval(text[pos]);
if (userid >=0 && userid < MAX_PLAYERS)
{
if(!IsPlayerConnected(userid))
{
if (playerid != INVALID_PLAYER_ID)
{
//SendClientMessage(playerid, 0xFF0000AA, "User not connected");
format(string, 256, "%s Is Not A Valid ID.", text);
if (playerid == -1)
{
//IRC_Say(gBotID, IRC_CHANNEL, string);
}else{
SendClientMessage(playerid, COLOR_ERROR, string);
}

}
userid = INVALID_PLAYER_ID;
}
else
{
return userid; // A player was found
}
}
Help about this Code Guys!!!

X337
09/07/2015, 06:14 AM
"ReturnUser" is already defined in your script, you just need to change the function name.
Example :
In your script :

stock ReturnUser(playerid, text[])//http://pyrokid.pastebin.com/f57277676


Change to :

stock UserReturn(playerid, text[])

PiLLoW
09/07/2015, 06:18 AM
Thanks for the help