05.12.2011, 19:00
Hello,
Here is my code
Here are the warnings:
Knowing that my
Abroadcast is
And forwarded like this:
Here is my code
pawn Код:
CMD:a(playerid, params[])
{
new sendernamee[MAX_PLAYER_NAME], stringgg[160];
if(!(PlayerInfo[playerid][pAdmin] >= 1)) return SendClientMessage(playerid, COLOR_RED,""red"PlayHard: {FFFFFF}You are Not an Administrator");
if(isnull(params)) return SendClientMessage(playerid,COLOR_RED,""red"PlayHard: {FFFFFF}/a [Admin Chat]");
GetPlayerName(playerid,sendernamee,sizeof(sendernamee));
sendernamee[strfind(sendernamee,"_")] = ' ';
if(PlayerInfo[playerid][pAdmin] == 1)
{
format(stringgg,160,"(( Level 1 Admin %s: %s ))",sendernamee,params);
ABroadCast(COLOR_RED,stringgg);
}
if(PlayerInfo[playerid][pAdmin] == 2)
{
format(stringgg,160,"(( Level 2 Admin %s: %s ))",sendernamee,params);
ABroadCast(COLOR_RED,stringgg);
}
if(PlayerInfo[playerid][pAdmin] == 3)
{
format(stringgg,160,"(( Level 3 Admin %s: %s ))",sendernamee,params);
ABroadCast(COLOR_RED,stringgg);
}
if(PlayerInfo[playerid][pAdmin] == 4)
{
format(stringgg,160,"(( Lead Admin %s: %s ))",sendernamee,params);
ABroadCast(COLOR_RED,stringgg);
}
return 1;
}
pawn Код:
C:\Documents and Settings\Administrator\Desktop\server\gamemodes\gm.pwn(875) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\server\gamemodes\gm.pwn(880) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\server\gamemodes\gm.pwn(885) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\server\gamemodes\gm.pwn(890) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Warnings.
Knowing that my
Abroadcast is
pawn Код:
public ABroadCast(color,const string[],level)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if (PlayerInfo[i][pAdmin] >= level)
{
SendClientMessage(i, color, string);
printf("%s", string);
}
}
}
return 1;
}
pawn Код:
forward ABroadCast(color,const string[],level);