10.09.2011, 10:49
pawn Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '*' && PlayerInfo[playerid][ALevel] >= 1)
{
new name;
new string;
GetPlayerName(playerid,name,24); //190
format(string,sizeof(string),"Admin Chat: %s (id:%d): %s",name,playerid,text[1]); //191
SendMessageToAdmins(string);
return 0;
}
return 1;
}
stock SendMessageToAdmins(text[])
{
for(new i; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][ALevel] >= 1 && IsPlayerConnected(i))
{
SendClientMessage(i,blue,text);
return 1;
}
}
}
Код:
test.pwn(190) : error 035: argument type mismatch (argument 2) test.pwn(191) : error 035: argument type mismatch (argument 1) test.pwn(191) : error 035: argument type mismatch (argument 1) test.pwn(192) : error 035: argument type mismatch (argument 1) test.pwn(189) : warning 203: symbol is never used: "string" test.pwn(208) : warning 209: function "SendMessageToAdmins" should return a value