What's wrong here? -
biker122 - 13.04.2014
I'm just trying to make a ban system using Y_INI. So, I have some errors here.. I have no idea on how to fix this up.
pawn Код:
if(fexist(BanPath(playerid))) // Line 596
{
new year,month,day,date[50],IP[20];
getdate(year,month,day);
GetPlayerIp(playerid,IP,sizeof(IP));
format(date,sizeof(date),"%i/%i/%i",day,month,year);
INI_ParseFile(BanPath(playerid),"LoadBan_%s", .bExtra = true, .extra = playerid);
format(string,sizeof(string),"Ban Name: %s\nBanned Admin: %s\nBan Reason: %s\nBanned IP: %s\nCurrent IP: %s\nBan Occured date: %s",GetName(playerid),PlayerInfo[playerid][pBannedBy],PlayerInfo[playerid][pBanReason],PlayerInfo[playerid][pBannedIP],IP,PlayerInfo[playerid][pBanOccuredDate]);
ShowPlayerDialog(playerid,DIALOG_BAN,DIALOG_STYLE_MSGBOX,"You are banned from this server!",string,"Bye bye!","");
}
Код:
C:\Users\Matt\Desktop\samp03z_svr_R1_win32\gamemodes\istunting.pwn(596) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Matt\Desktop\samp03z_svr_R1_win32\gamemodes\istunting.pwn(596) : warning 215: expression has no effect
C:\Users\Matt\Desktop\samp03z_svr_R1_win32\gamemodes\istunting.pwn(596) : error 001: expected token: ";", but found ")"
C:\Users\Matt\Desktop\samp03z_svr_R1_win32\gamemodes\istunting.pwn(596) : error 029: invalid expression, assumed zero
C:\Users\Matt\Desktop\samp03z_svr_R1_win32\gamemodes\istunting.pwn(596) : fatal error 107: too many error messages on one line
Thanks in advance!
Re: What's wrong here? - Guest4390857394857 - 13.04.2014
can you post us the line 596 alone once? [Use CTRL + G]
Re: What's wrong here? -
biker122 - 13.04.2014
Quote:
Originally Posted by biker122
pawn Код:
if(fexist(BanPath(playerid))) // Line 596
|
I mentioned it already! ^
Re: What's wrong here? - Guest4390857394857 - 13.04.2014
try replacing that line with this!
Код:
if(fexist(BanPath(playerid)));
Re: What's wrong here? -
biker122 - 13.04.2014
Since when 'if' statements get ";" on their end?
Re : What's wrong here? -
S4t3K - 13.04.2014
What the fuck does a semicolon in a condition ?
It will just crash your compiler, don't do.
Post the lines above the error. (3 may suffy)
Re: What's wrong here? -
biker122 - 13.04.2014
pawn Код:
SendClientMessage(playerid,COLOR_SERVER,"[SERVER] "WHITE"You could also check /credits to see who made this server possible!"); //Line 593
format(string,sizeof(string),"6%s(%d) has connected to the server!",pname,playerid); //Line 594
IRC_Say(gGroupID,IRC_CHANNEL,string); // Line 595
if(fexist(BanPath(playerid))) // Line 596
Here you go!
Re : What's wrong here? -
S4t3K - 13.04.2014
Try to comment the line 594 then re-compile.
Then look if the problem is still here, if it is, look at the function itself. Either, I don't know how to solve it :3
Re: What's wrong here? -
biker122 - 13.04.2014
Found my mistake! xD
"BanPath" is #define'ed for locating the ban files
and I made a stock for UserBanPath which sends that to BanPath.
Thanks anyways!