Undefined symbol "ReturnUser"
#1

Hey,

as usual I'm full with fcking errors. This time this:

undefined symbol "ReturnUser"

I know I know that ReturnUser undefined is. I tried 2 ReturnUser functions but both gave me even more errors. Now, what can I do?
Reply
#2

pawn Код:
return user ;
Reply
#3

1. Why should I need to show you Codes if you just have to send me a working code?^^
Reply
#4

3.
pawn Код:
giveplayerid = ReturnUser(tmp);
Happy now?
@AK: Your code obviously didn't work
Reply
#5

EDIT: To slow.
Reply
#6

Quote:
Originally Posted by sapsap
Посмотреть сообщение
3.
pawn Код:
giveplayerid = ReturnUser(tmp);
Happy now?
@AK: Your code obviously didn't work
firstly i though u returning the file as
pawn Код:
public CallbackName ( ) {
     return user ;
}
so i just straigh for it

secondly i don't even know thats was the code..

EDIT:
pawn Код:
new
     ReturnUser = strval(params);
maybe..
Reply
#7

Wait... Can you explain what you are trying to do? What is "ReturnUser" used for in your script?
And what Is ReturnUser? Never heard of it.
Reply
#8

Quote:
Originally Posted by AK47317
Посмотреть сообщение
firstly i though u returning the file as
pawn Код:
public CallbackName ( ) {
     return user ;
}
so i just straigh for it

secondly i don't even know thats was the code..

EDIT:
pawn Код:
new
     ReturnUser = strval(params);
maybe..
First of all thanks but even that isn't working. I already ******d the function ReturnUser but that would only fill me with more and more errors.

//Edit: Here is the complete command:
pawn Код:
if(strcmp(cmd, "/id", true) == 0)
{
    if (PlayerInfo[playerid][pAdmin] >= 1)
    {
    tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_YELLOW, "Fehler: /id [playerid]");
            SendClientMessage(playerid, COLOR_YELLOW, "Funktion: Um die ID eines Spielers zu sehen.");
            return 1;
        }

        giveplayerid = ReturnUser(tmp);
        if(IsPlayerConnected(giveplayerid))
        {
            new sstring[256];
            new ip[128];
            GetPlayerIp(giveplayerid,ip,128);
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            format(sstring, sizeof(sstring), "-| %s's IP: %s |-", giveplayer,ip);
            SendClientMessage(playerid,COLOR_LIGHTBLUE, sstring);
        }
        else
        {
            format(string, sizeof(string), "%d is not an active player.", giveplayerid);
            SendClientMessage(playerid, COLOR_RED, string);
        }
    }
    else
    {
    SendClientMessage(playerid, COLOR_RED, "You are not an admin.");
    }
   return 1;
   }
Reply
#9

Quote:
Originally Posted by Mike Garber
Посмотреть сообщение
Wait... Can you explain what you are trying to do? What is "ReturnUser" used for in your script?
And what Is ReturnUser? Never heard of it.
Its a shitty GF function

pawn Код:
ReturnUser(text[], playerid = INVALID_PLAYER_ID)
{
    new pos = 0;
    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
    {
        userid = strval(text[pos]);
        if (userid >=0 && userid < MAX_PLAYERS)
        {
            if(!IsPlayerConnected(userid))
            {
                userid = INVALID_PLAYER_ID;
            }
            else
            {
                return userid;
            }
        }
    }
    new len = strlen(text[pos]);
    new count = 0;
    new name[MAX_PLAYER_NAME];
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
        if (IsPlayerConnected(i))
        {
            GetPlayerName(i, name, sizeof (name));
            if (strcmp(name, text[pos], true, len) == 0)
            { if (len == strlen(name)) { return i;
                } else  {
                    count++;
                    userid = i;
                } } } } if (count != 1)
    { if (playerid != INVALID_PLAYER_ID)
        { if (count)
            { SendClientMessage(playerid, 0xFF0000AA, "Multiple users found, please narrow earch");
            } else { SendClientMessage(playerid, 0xFF0000AA, "No matching user found");}
                } userid = INVALID_PLAYER_ID; } return userid;
}
Have fun.
Reply
#10

Thanks but like I said it gives me tons of errors like this:

selfmade - Copy.pwn(35671) : warning 219: local variable "giveplayerid" shadows a variable at a preceding level
selfmade - Copy.pwn(35679) : warning 219: local variable "idx" shadows a variable at a preceding level
And the best error is:
selfmade - Copy.pwn(38181) : error 021: symbol already defined: "strtok" LoL
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)