SA-MP Forums Archive
Undefined symbol: GetName - 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: Undefined symbol: GetName (/showthread.php?tid=388434)



Undefined symbol: GetName - Ghost252 - 28.10.2012

Well, I used this code:

Код:
 
public OnPlayerText(playerid, text[])
{
    new
        message[128];
    format(message, sizeof(message), "%s says: %s", GetName(playerid), text);
    ProxDetector(30.0, playerid, message, -1);
    return 0;
}
And I get this error:

Код:
C:\Users\PC\Desktop\MyGM\gamemodes\GM.pwn(130) : error 017: undefined symbol "GetName"
Help will be appreciated.


Re: Undefined symbol: GetName - Swyft™ - 28.10.2012

You didn't define getting the players name....


Re: Undefined symbol: GetName - ryansheilds - 28.10.2012

It isnt defined...

pawn Код:
stock GetName(playerid);
{
    new szName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, szName, sizeof(szName));
    return szName;
}
Add that to the script.


Re: Undefined symbol: GetName - Ghost252 - 28.10.2012

Ok thanks Ryan, will try now.


Re: Undefined symbol: GetName - Ghost252 - 28.10.2012

I've received these errors after using your code:

Код:
C:\Users\Yakir\Desktop\The Best Server\gamemodes\GM.pwn(130) : error 004: function "GetName" is not implemented
C:\Users\Yakir\Desktop\The Best Server\gamemodes\GM.pwn(329) : error 055: start of function body without function header
C:\Users\Yakir\Desktop\The Best Server\gamemodes\GM.pwn(331) : error 021: symbol already defined: "GetPlayerName"
C:\Users\Yakir\Desktop\The Best Server\gamemodes\GM.pwn(332) : error 010: invalid function or declaration
C:\Users\Yakir\Desktop\The Best Server\gamemodes\GM.pwn(335) : warning 203: symbol is never used: "szName"



Re: Undefined symbol: GetName - PrawkC - 28.10.2012

Remove the ";" in on the first line of the stock.


Re: Undefined symbol: GetName - Ghost252 - 28.10.2012

Done, it complied, Thanks guys.


Re : Undefined symbol: GetName - Dutheil - 20.06.2015

fail : omg the bump sorry