C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier (3)\gamemodes\xD.pwn(3058) : warning 202: number of arguments does not match definition C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier (3)\gamemodes\xD.pwn(3059) : warning 202: number of arguments does not match definition C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier (3)\gamemodes\xD.pwn(3060) : warning 202: number of arguments does not match definition C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier (3)\gamemodes\xD.pwn(3061) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Warnings.
SendClientMessage(playerid, RED,"Reason: %s", reason);
SendClientMessage(playerid, RED,"Admin Name: %s", GetName(playerid));
SendClientMessage(playerid, RED,"Your Name: %s", Playername);
SendClientMessage(playerid, RED,"Admin Name: %s", Adminname);
YCMD:ban(playerid,params[], help)
{
if(P_Data[playerid][pAdmin] >= 2) {
new PID; //define the playerid we wanna ban
new reason; //the reason, put into a string
new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME]; //defines the function with the playername we wanna get
GetPlayerName(playerid, Adminname, sizeof(Adminname));
GetPlayerName(PID, Playername, sizeof(Playername));
if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /ban [playerid] [reason]"); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)
if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
return
SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
SendClientMessage(playerid, RED,"=====================================================");
SendClientMessage(playerid, RED,"You have been banned from this Server!");
SendClientMessage(playerid, RED,"Reason: %s", reason);
SendClientMessage(playerid, RED,"Admin Name: %s", GetName(playerid));
SendClientMessage(playerid, RED,"Your Name: %s", Playername);
SendClientMessage(playerid, RED,"Admin Name: %s", Adminname);
SendClientMessage(playerid, RED,"=====================================================");
SendClientMessage(playerid, RED,"if you have wroungfully banned or if you want to get a chance to play here again,please press F8 tp make screenhot and make apply in our Forum ");
Ban(PID);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have to be level 2 to use that command!"); //return this message
}
return 1;
}
(playerid, color, const message[])
SendClientMessage(playerid, RED,"Reason: %s", reason);
SendClientMessage(playerid, RED,"Admin Name: %s", GetName(playerid));
SendClientMessage(playerid, RED,"Your Name: %s", Playername);
SendClientMessage(playerid, RED,"Admin Name: %s", Adminname);
number of arguments does not match definition
SendClientMessage(playerid, RED,"Reason: %s", reason);
SendClientMessage(playerid, RED,"Admin Name: %s", GetName(playerid));
SendClientMessage(playerid, RED,"Your Name: %s", Playername);
SendClientMessage(playerid, RED,"Admin Name: %s", Adminname);
SendClientMessage(playerid, RED,"Admin Name: %s", GetName(playerid));
new string[218], astring[218], anumber;
// imagine astring is "Hello!" and anumber is 5
format(string, sizeof(string), "My text with a string %s and a number: %d", astring, anumber);
SendClientMessage(playerid, COLOUR_WHATEVER, string);
// text now comes out in COLOUR_WHATEVER and the text is: My text with a string Hello! and a number: 5
C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier (3)\gamemodes\xD.pwn(3059) : error 029: invalid expression, assumed zero C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier (3)\gamemodes\xD.pwn(3059) : warning 215: expression has no effect C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier (3)\gamemodes\xD.pwn(3059) : warning 215: expression has no effect C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier (3)\gamemodes\xD.pwn(3059) : error 001: expected token: ";", but found ")" C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier (3)\gamemodes\xD.pwn(3059) : error 029: invalid expression, assumed zero C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier (3)\gamemodes\xD.pwn(3059) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
format(string, sizeof(string), " Reason: %s\nYour Name: %s\nAdmin Name: %s", reason, , Playername, Adminname);
SendClientMessage(playerid, RED, string);
Код:
C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier (3)\gamemodes\xD.pwn(3059) : error 029: invalid expression, assumed zero C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier (3)\gamemodes\xD.pwn(3059) : warning 215: expression has no effect C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier (3)\gamemodes\xD.pwn(3059) : warning 215: expression has no effect C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier (3)\gamemodes\xD.pwn(3059) : error 001: expected token: ";", but found ")" C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier (3)\gamemodes\xD.pwn(3059) : error 029: invalid expression, assumed zero C:\Documents and Settings\Administrateur\Bureau\Nouveau dossier (3)\gamemodes\xD.pwn(3059) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. pawn Код:
|
new str_reason[60],str_name[35],str_aname[35];
format(str_reason,sizeof(str_reason),"Reason: %s.",reason);
format(str_name,sizeof(str_name),"Your Name: %s.",Playername);
format(str_aname,sizeof(str_aname),"Admin Name: %s.",Adminname);
SendClientMessage(playerid,RED,str_reason);
SendClientMessage(playerid,RED,str_name);
SendClientMessage(playerid,RED,str_aname);
reason, , Playername, Adminname
reason, Playername, Adminname