undefined symbol "PlayerName" (Errors) - 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 "PlayerName" (Errors) (
/showthread.php?tid=549927)
undefined symbol "PlayerName" (Errors) -
TheSnaKe - 09.12.2014
Am getting this error when am compiling my script, how can i fix it?
Errors:
Код:
: error 017: undefined symbol "PlayerName"
: error 017: undefined symbol "PlayerName"
: error 017: undefined symbol "PlayerName"
: error 017: undefined symbol "PlayerName"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Code:
(Error 1)
Код:
format(string, sizeof(string), "City Alert: Bank Robber %s was eliminated, the bank robbery has failed!", PlayerName(playerid));
(Error 2)
Код:
format(string, sizeof(string), "City Alert: Bank Robber %s was eliminated, the bank robbery has failed!", PlayerName(playerid));
(Error 3)
Код:
format(string, 256, "City Alert: %s successfully stole $%d from the Los Santos Bank!", PlayerName(playerid), cash);
(Error 4)
Код:
format(string, sizeof(string), "* %s finishes packing money into their briefcase.", PlayerName(BankJobPlayer));
Well, how can i fix this?
Re: undefined symbol "PlayerName" (Errors) -
Schneider - 09.12.2014
By adding that function to your script:
pawn Код:
stock PlayerName(playerid)
{
new Pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, Pname, sizeof(Pname));
return Pname;
}
Re: undefined symbol "PlayerName" (Errors) -
mehdimmz - 09.12.2014
put this before them
PHP код:
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
Re: undefined symbol "PlayerName" (Errors) -
TheSnaKe - 09.12.2014
Quote:
Originally Posted by Schneider
By adding that function to your script:
pawn Код:
stock PlayerName(playerid) { new Pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, Pname, sizeof(Pname)); return Pname; }
|
Am getting more errors..
Re: undefined symbol "PlayerName" (Errors) -
Schneider - 09.12.2014
What errors....?
Re: undefined symbol "PlayerName" (Errors) -
TheSnaKe - 09.12.2014
Fixed thanks, +rep