What's wrong here?
#1

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!
Reply
#2

can you post us the line 596 alone once? [Use CTRL + G]
Reply
#3

Quote:
Originally Posted by biker122
Посмотреть сообщение
pawn Код:
if(fexist(BanPath(playerid))) // Line 596
I mentioned it already! ^
Reply
#4

try replacing that line with this!
Код:
if(fexist(BanPath(playerid)));
Reply
#5

Since when 'if' statements get ";" on their end?
Reply
#6

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)
Reply
#7

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!
Reply
#8

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
Reply
#9

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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)