[Error] How to fix: Stupid error: 079 ????
#1

Hi,
i have this error:
Quote:

\\87.208.200.52\SERVER:100\Users\Crusher\Desktop\N oName.pwn(364) : error 079: inconsistent return types (array & non-array)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Error.

pawn Код:
stock Crshr_GetPlayerName(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        new name[MAX_PLAYER_NAME] = "~";
        GetPlayerName(playerid,name,sizeof(name));
        return name;
    }
    else
    {
        return false; //line 364
    }
}
Reply
#2

What is the function supposed to do?
Reply
#3

Getting the player name
example:
pawn Код:
new string[128];
format(string,sizeof(string), "~w~You're name is~n~~b~ %s",Crshr_GetPlayerName(playerid));
GameTextForPlayer(playerid,string,4000,5);
Reply
#4

arite, what is it going to be recorded for?
like a log or a message...?
Reply
#5

i have it now so:
pawn Код:
stock Crshr_GetPlayerName(playerid)
{
    new name[MAX_PLAYER_NAME] = "~";
    GetPlayerName(playerid,name,sizeof(name));
    return name;
}
it compiles without errors.'
Reply
#6

haha arite.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)