error 001: expected token: ";", but found ")"
#1

Error Codes
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Code that has the errors.
pawn Код:
if(Player[playerid][Banned] == 1 || Player[playerid][Banned] == 2 || Player[playerid][Banned] == 4)
            {
                new second, hour, minute, day, year, month;
                new RemoveUnderScore;
                gettime(hour, minute, second);
                getdate(year, month, day);
                new IP[21];
                GetPlayerIp(playerid, IP, sizeof(IP));
                SendClientMessage(playerid, ANNOUNCEMENT, "{FF3300}Your IP has been banned from the server.");
                format(string, sizeof(string), "Ban: %s has been auto-banned, defined reason: Attempted Ban Evasion.", RemoveUnderScore(playerid));
                printf("Ban %s has been banned by the Auto Ban. [Reason: Ban Evading.]", Name);
                format(post_string, sizeof(post_string), "action=addban&apikey="#APIKEY"&ban_user=%s&ban_reason=Ban Evading&ban_admin=Auto-ban&ban_ip=%s",Player[playerid][NormalName], ips[playerid];
                HTTP(playerid, HTTP_POST, APIPATH, post_string, "OnBanResponse");
                Ban(playerid);
                return 1;
            }
I really dont understand how its going wrong O_o
Reply
#2

pawn Код:
if(Player[playerid][Banned] == 1 || Player[playerid][Banned] == 2 || Player[playerid][Banned] == 4)
            {
                new second, hour, minute, day, year, month;
                new RemoveUnderScore;
                gettime(hour, minute, second);
                getdate(year, month, day);
                new IP[21];
                GetPlayerIp(playerid, IP, sizeof(IP));
                SendClientMessage(playerid, ANNOUNCEMENT, "{FF3300}Your IP has been banned from the server.");
                format(string, sizeof(string), "Ban: %s has been auto-banned, defined reason: Attempted Ban Evasion.", RemoveUnderScore(playerid));
                printf("Ban %s has been banned by the Auto Ban. [Reason: Ban Evading.]", Name);
                format(post_string, sizeof(post_string), "action=addban&apikey="APIKEY"&ban_user=%s&ban_reason=Ban Evading&ban_admin=Auto-ban&ban_ip=%s",Player[playerid][NormalName], ips[playerid];
                HTTP(playerid, HTTP_POST, APIPATH, post_string, "OnBanResponse");
                Ban(playerid);
                return 1;
            }
Reply
#3

Still have the same errors..
Reply
#4

what is this for?:

new RemoveUnderScore;
Reply
#5

thats basically, GivePlayerName
Reply
#6

Код:
format(post_string, sizeof(post_string), "action=addban&apikey="#APIKEY"&ban_user=%s&ban_reason=Ban Evading&ban_admin=Auto-ban&ban_ip=%s",Player[playerid][NormalName], ips[playerid];
You need to close your format function call so you get instead:
Код:
format(post_string, sizeof(post_string), "action=addban&apikey="#APIKEY"&ban_user=%s&ban_reason=Ban Evading&ban_admin=Auto-ban&ban_ip=%s",Player[playerid][NormalName], ips[playerid]);
Reply
#7

Try
Код:
if(Player[playerid][Banned] == 1 || Player[playerid][Banned] == 2 || Player[playerid][Banned] == 4);
            {
                new second, hour, minute, day, year, month;
                new RemoveUnderScore;
                gettime(hour, minute, second);
                getdate(year, month, day);
                new IP[21];
                GetPlayerIp(playerid, IP, sizeof(IP));
                SendClientMessage(playerid, ANNOUNCEMENT, "{FF3300}Your IP has been banned from the server.");
                format(string, sizeof(string), "Ban: %s has been auto-banned, defined reason: Attempted Ban Evasion.", RemoveUnderScore(playerid));
                printf("Ban %s has been banned by the Auto Ban. [Reason: Ban Evading.]", Name);
                format(post_string, sizeof(post_string), "action=addban&apikey="APIKEY"&ban_user=%s&ban_reason=Ban Evading&ban_admin=Auto-ban&ban_ip=%s",Player[playerid][NormalName], ips[playerid];
                HTTP(playerid, HTTP_POST, APIPATH, post_string, "OnBanResponse");
                Ban(playerid);
                return 1;
            }
Reply
#8

still noany work
Reply
#9

wont work tuntun, he forgot a closing bracket ")" at the end where he calls format on the string he uses in HTTP() function call. Just change what i posted oscii.
Reply
#10

ok try this:
Код:
if(Player[playerid][Banned] == 1 || Player[playerid][Banned] == 2 || Player[playerid][Banned] == 4))
            {
                new second, hour, minute, day, year, month;
                new RemoveUnderScore;
                gettime(hour, minute, second);
                getdate(year, month, day);
                new IP[21];
                GetPlayerIp(playerid, IP, sizeof(IP));
                SendClientMessage(playerid, ANNOUNCEMENT, "{FF3300}Your IP has been banned from the server.");
                format(string, sizeof(string), "Ban: %s has been auto-banned, defined reason: Attempted Ban Evasion.", RemoveUnderScore(playerid));
                printf("Ban %s has been banned by the Auto Ban. [Reason: Ban Evading.]", Name);
                format(post_string, sizeof(post_string), "action=addban&apikey="APIKEY"&ban_user=%s&ban_reason=Ban Evading&ban_admin=Auto-ban&ban_ip=%s",Player[playerid][NormalName], ips[playerid];
                HTTP(playerid, HTTP_POST, APIPATH, post_string, "OnBanResponse");
                Ban(playerid);
                return 1;
            }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)