SA-MP Forums Archive
2 questions - 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: 2 questions (/showthread.php?tid=275900)



2 questions - samtey - 11.08.2011

Hi!

How to fix this?

Код:
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(114) : error 017: undefined symbol "PlayerName"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
line:

PHP код:
format(str128"System: %s [ID %d] has set %s [ID %d] gangsterlevel to %s."PlayerName(playerid), playeridPlayerName(id), idglevel); 
2. question after error is fixed, cause my server won't start!


AW: 2 questions - Drebin - 11.08.2011

The compiler doesn't know what "PlayerName" is. You have to define it.


Re: 2 questions - Wesley221 - 11.08.2011

pawn Код:
new myname[24], targetname[24];
GetPlayerName(playerid, myname, 24);
GetPlayerName(Target, targetname, 24);
Or you need to make a stock with the PlayerName function.


AW: 2 questions - samtey - 11.08.2011

How to define it rightly?


AW: 2 questions - Drebin - 11.08.2011

https://sampwiki.blast.hk/wiki/GetPlayerName


Re: 2 questions - Wesley221 - 11.08.2011

pawn Код:
stock PlayerName(playerid)
{
     new pName[25];
     GetPlayerName(playerid, pName, sizeof(pName));
     return pName;
}



AW: 2 questions - samtey - 11.08.2011

Ok, here is question 2! Look what I wrote in the chat in the picture!


Re: 2 questions - Kingunit - 11.08.2011

About that second problem. Drop your OnPlayerText code here.


Re: AW: 2 questions - Darnell - 11.08.2011

Quote:
Originally Posted by samtey
Посмотреть сообщение
Ok, here is question 2! Look what I wrote in the chat in the picture!
Send me the code that it's being green and I'll be able to help you


Re: 2 questions - sleepysnowflake - 11.08.2011

Dude, can can check my FS. You can learn from it. I was doing the same thing on it.

https://sampforum.blast.hk/showthread.php?tid=273863