Invalid Expression assumed Zero
#1

Код:
	        if(strfind(text, ":", true) != -1) {
	            new i_numcount, i_period, i_pos;
	            while(text[i_pos]) {
	                if('0' <= text[i_pos] <= '9') i_numcount ++;
	                else if(text[i_pos] == '.') i_period ++;
	                i_pos++;
	            }
	            }
	                if(i_numcount >= 8 && i_period >= 3) {
          			format(str,144,"«| %s Has Been Banned! [Reason: Advertisement] |»",PlayerName[playerid]);
                    SendClientMessageToAll(COLOR_HAUT,str);
                    SendClientMessage(playerid,0xFF997FFF,"«| You're banned from Zombies Vs Survivors [ZvS]! |»");
                    SendClientMessage(playerid,0xFF997FFF,"«| You Want To Get Unbanned? Post An Unban-Appeal On Our Website: www.Zombie-Opr.tk |»");
                    SendClientMessage(playerid,0xFF997FFF,"«| Press F8 To Take An Picture! |»");
                    Ban(playerid);
	                return 0;
	}
	return 0;
}
new i_numcount, i_period, i_pos; - Invalid Expression assumed Zero
if(i_numcount >= 8 && i_period >= 3) { - undefined Symbol "i_numcount"

Know everyone an Answer?
Reply
#2

Try this:
pawn Код:
if(strfind(text, ":", true) != -1)
{
    new i_numcount, i_period, i_pos;
    while(text[i_pos])
    {
        if('0' <= text[i_pos] <= '9') i_numcount ++;
        else if(text[i_pos] == '.') i_period ++;
        i_pos++;
    }
    if(i_numcount >= 8 && i_period >= 3)
    {
        format(str, 144, "«| %s Has Been Banned! [Reason: Advertisement] |»", PlayerName[playerid]);
        SendClientMessageToAll(COLOR_HAUT, str);
        SendClientMessage(playerid, 0xFF997FFF, "«| You're banned from Zombies Vs Survivors [ZvS]! |»");
        SendClientMessage(playerid, 0xFF997FFF, "«| You Want To Get Unbanned? Post An Unban-Appeal On Our Website: http://www.Zombie-Opr.tk |»");
        SendClientMessage(playerid, 0xFF997FFF, "«| Press F8 To Take An Picture! |»");
        Ban(playerid);
    }
    return 0;
}
Reply
#3

Work not then i get Bracketerrors.
Reply
#4

Then you screwed up elsewhere. That code Roach_ posted looks perfectly fine to me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)