stock BanPlayer(playerid,reason[],admin[]) { new str[128]; BanEx(playerid,reason); format(str,sizeof(str),"You have been currently banned from this server.\nUser: %s\nReason: %s\nAdmin %s\n",PlayerName(playerid),reason,admin); ShowPlayerDialog(playerid,DIALOG_BANNED,DIALOG_STYLE_MSGBOX,"You have been banned!",str,"Leave",""); return 1; }
C:\Users\HichamMeftah\Desktop\testgm.pwn(1166) : error 012: invalid function call, not a valid address C:\Users\HichamMeftah\Desktop\testgm.pwn(1166) : warning 215: expression has no effect C:\Users\HichamMeftah\Desktop\testgm.pwn(1166) : error 001: expected token: ";", but found ")" C:\Users\HichamMeftah\Desktop\testgm.pwn(1166) : error 029: invalid expression, assumed zero C:\Users\HichamMeftah\Desktop\testgm.pwn(1166) : 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(str,sizeof(str),"You have been currently banned from this server.\nUser: %s\nReason: %s\nAdmin %s\n",PlayerName(playerid),reason,admin);
forward BanExPlayer(playerid,reason[]);
Stock BanPlayer(playerid, reason[], admin[])
{
// here shows some thing you want to player see
SetTimerEx("BanExPlayer",1000,false,"ds",playerid,reason);
return 1;
}
public BanExPlayer(playerid,reason[])
{
BanEx(playerid,reason);
return 1;
}
stock UserPath(playerid) { new string[128],playername[MAX_PLAYER_NAME]; // this line GetPlayerName(playerid,playername,sizeof(playername)); // and this line too format(string,sizeof(string),PATH,playername); return string; }
C:\Users\HichamMeftah\Desktop\testgm.pwn(611) : error 001: expected token: "-identifier-", but found "[" C:\Users\HichamMeftah\Desktop\testgm.pwn(612) : error 029: invalid expression, assumed zero C:\Users\HichamMeftah\Desktop\testgm.pwn(612) : warning 215: expression has no effect C:\Users\HichamMeftah\Desktop\testgm.pwn(612) : error 001: expected token: ";", but found "]" C:\Users\HichamMeftah\Desktop\testgm.pwn(612) : error 029: invalid expression, assumed zero C:\Users\HichamMeftah\Desktop\testgm.pwn(612) : fatal error 107: too many error messages on one line
i defined playername and now it got fixed but another problem popped up
Код:
stock UserPath(playerid) { new string[128],playername[MAX_PLAYER_NAME]; // this line GetPlayerName(playerid,playername,sizeof(playername)); // and this line too format(string,sizeof(string),PATH,playername); return string; } Код:
C:\Users\HichamMeftah\Desktop\testgm.pwn(611) : error 001: expected token: "-identifier-", but found "[" C:\Users\HichamMeftah\Desktop\testgm.pwn(612) : error 029: invalid expression, assumed zero C:\Users\HichamMeftah\Desktop\testgm.pwn(612) : warning 215: expression has no effect C:\Users\HichamMeftah\Desktop\testgm.pwn(612) : error 001: expected token: ";", but found "]" C:\Users\HichamMeftah\Desktop\testgm.pwn(612) : error 029: invalid expression, assumed zero C:\Users\HichamMeftah\Desktop\testgm.pwn(612) : fatal error 107: too many error messages on one line ![]() |
/* ok i think your problem is why you are defining varb playername 2x times
so please make sure to do this*/
#define PATH "your file adress"
Stock UserPatch(playerid)
{
new str[128],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
format(str,sizeof(str),PATH,pName);
return str;
}