Undefined symbol "ReturnUser"
#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


Messages In This Thread
Undefined symbol "ReturnUser" - by sapsap - 25.03.2011, 13:10
Re: Undefined symbol "ReturnUser" - by AK47317 - 25.03.2011, 13:11
Re: Undefined symbol "ReturnUser" - by sapsap - 25.03.2011, 13:13
Re: Undefined symbol "ReturnUser" - by sapsap - 25.03.2011, 13:15
Re: Undefined symbol "ReturnUser" - by Stigg - 25.03.2011, 13:16
Re: Undefined symbol "ReturnUser" - by AK47317 - 25.03.2011, 13:17
Re: Undefined symbol "ReturnUser" - by Mike Garber - 25.03.2011, 13:19
Re: Undefined symbol "ReturnUser" - by sapsap - 25.03.2011, 13:21
Re: Undefined symbol "ReturnUser" - by Hashski - 25.03.2011, 13:22
Re: Undefined symbol "ReturnUser" - by sapsap - 25.03.2011, 13:25

Forum Jump:


Users browsing this thread: 7 Guest(s)