PDA

View Full Version : Errors


cs_waller
16/03/2012, 08:32 PM
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

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:

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 :)

cs_waller
17/03/2012, 11:44 AM
bump

Daddy Yankee
17/03/2012, 01:06 PM
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]);
}

cs_waller
17/03/2012, 02:27 PM
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

cs_waller
17/03/2012, 07:09 PM
bump - I need very much this :X