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: Errors (
/showthread.php?tid=326236)
Errors -
cs_waller - 16.03.2012
I attemps to make when player use mask and when he say anything in chat in the chat will be Stranger[Masked_%d] but I have 4 errors
pawn Код:
new sendername[1][MAX_PLAYER_NAME];
sendername = GetPlayerNameEx(playerid)
if(PlayerInfo[playerid][pMaskUse] == 1);
{
format(sendername, MAX_PLAYER_NAME, "Stranger[Masked_%d]",MaskedName[playerid])
}
Errors:
PHP код:
error 017: undefined symbol "GetPlayerNameEx"
array must be indexed (variable "sendername")
error 036: empty statement
fatal error 107: too many error messages on one line
Sorry for my bad english and thanks in advanced
Re: Errors -
cs_waller - 17.03.2012
bump
Re: Errors -
Daddy Yankee - 17.03.2012
pawn Код:
stock GetPlayerNameEx(playerid,name[],len=sizeof(name))
{
GetPlayerName(playerid,name,len);
for(new cell;cell<strlen(name);cell++)if(name[cell]=='_')name[cell]=' ';
}
new sendername[MAX_PLAYER_NAME];
GetPlayerNameEx(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pMaskUse] == 1)
{
format(sendername, MAX_PLAYER_NAME, "Stranger[Masked_%d]",MaskedName[playerid]);
}
Re: Errors -
cs_waller - 17.03.2012
Old errors dissapear but now I have new 4 errors :X
error 029: invalid expression, assumed zero
error 017: undefined symbol "GetPlayerNameEx"
error 001: expected token: ",", but found "sizeof"
fatal error 107: too many error messages on one line
Re: Errors -
cs_waller - 17.03.2012
bump - I need very much this :X