PlayerName error
#1

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.
Reply
#2

Isn't the function PlayerName(playerid)?
Reply
#3

pawn Код:
if(strcmp(name, "[4X4]Torran", false) == 0)
Use this.
Reply
#4

Quote:
Originally Posted by ʎʇʇnןʞ
pawn Код:
if(strcmp(name, "[4X4]Torran", false) == 0)
Use this.
Now am getting
Код:
error 017: undefined symbol "name"
Reply
#5

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; }
Reply
#6

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)

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)