10.10.2017, 13:58
: warning 219: local variable "pName" shadows a variable at a preceding level
: error 017: undefined symbol "pName"
: error 017: undefined symbol "PlayerInfo"
: warning 215: expression has no effect
: error 001: expected token: ";", but found "]"
: error 029: invalid expression, assumed zero
on:
CMDm(playerid,params[])
{
new id,msg[128],str2[128];
if(sscanf(params,"us[128]",id,str2)) return SendClientMessage(playerid,-1,"USAGE: /pm [playerid] [Message]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Error: That Player Is Not Connected");
format(msg,sizeof(msg),"PM To %s (ID: %d): %s",pName(id),id,str2);
SendClientMessage(playerid,0xFF00FFFF,msg);
if(PlayerInfo[playerid][pAdmin] >= 1)
{
format(msg,sizeof(msg),"PM From Admin %s (ID: %d): %s",pName(playerid),playerid,str2);
SendClientMessage(id,0xFF00FFFF,msg);
}
else
{
format(msg,sizeof(msg),"PM From %s (ID: %d): %s",pName(playerid),playerid,str2);
SendClientMessage(id,0xFF00FFFF,msg);
}
return 1;
}
: error 017: undefined symbol "pName"
: error 017: undefined symbol "PlayerInfo"
: warning 215: expression has no effect
: error 001: expected token: ";", but found "]"
: error 029: invalid expression, assumed zero
on:
CMDm(playerid,params[])
{
new id,msg[128],str2[128];
if(sscanf(params,"us[128]",id,str2)) return SendClientMessage(playerid,-1,"USAGE: /pm [playerid] [Message]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Error: That Player Is Not Connected");
format(msg,sizeof(msg),"PM To %s (ID: %d): %s",pName(id),id,str2);
SendClientMessage(playerid,0xFF00FFFF,msg);
if(PlayerInfo[playerid][pAdmin] >= 1)
{
format(msg,sizeof(msg),"PM From Admin %s (ID: %d): %s",pName(playerid),playerid,str2);
SendClientMessage(id,0xFF00FFFF,msg);
}
else
{
format(msg,sizeof(msg),"PM From %s (ID: %d): %s",pName(playerid),playerid,str2);
SendClientMessage(id,0xFF00FFFF,msg);
}
return 1;
}