PlayerName error - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: PlayerName error (
/showthread.php?tid=73134)
PlayerName error -
JoeDaDude - 12.04.2009
Hi, Im making a privatecar script,
And i keep getting this error,
Error:
Код:
error 017: undefined symbol "PlayerName"
Code
pawn Код:
if(strcmp(PlayerName, "[4X4]Torran", false) == 0
{
This script has been made by my friend,
I have re-made it by myself, The codes are the same,
My friend`s code didnt contain strtok and it worked,
This code can work without strtok.
Re: PlayerName error -
Pyrokid - 12.04.2009
Isn't the function PlayerName(playerid)?
Re: PlayerName error -
Klutty - 12.04.2009
pawn Код:
if(strcmp(name, "[4X4]Torran", false) == 0)
Use this.
Re: PlayerName error -
JoeDaDude - 12.04.2009
Quote:
Originally Posted by ʎʇʇnןʞ
pawn Код:
if(strcmp(name, "[4X4]Torran", false) == 0)
Use this.
|
Now am getting
Код:
error 017: undefined symbol "name"
Re: PlayerName error -
OmeRinG - 12.04.2009
while using your script put on top of your script under #include <a_samp>:
pawn Код:
stock PlayerName(playerid) { new temp[MAX_PLAYER_NAME]; GetPlayerName(playerid,temp,sizeof(temp)); return temp; }
Re: PlayerName error -
Backwardsman97 - 12.04.2009
Quote:
Originally Posted by JoeDaDude
Quote:
Originally Posted by ʎʇʇnןʞ
pawn Код:
if(strcmp(name, "[4X4]Torran", false) == 0)
Use this.
|
Now am getting
Код:
error 017: undefined symbol "name"
|
Because it has to be defined.
pawn Код:
if(strcmp(PlayerName(playerid), "[4X4]Torran", false) == 0)
and if that doesn't work.
pawn Код:
new name[24];
GetPlayerName(playerid,name,24);
if(strcmp(name, "[4X4]Torran", false) == 0)