invalid function?
#1

pawn Код:
forward AntiMoney();
public AntiMoney()
{
for (new i = 0; i != MAX_PLAYERS; ++i)
{
  if (IsPlayerConnected(i))
    {
      if (GetPlayerMoney(i) > 9999998)
            {
                 SendClientMessage(i, 0xFFFFFF, "You forgot to pay the tax.");
                 new string[128];
                 new pName[MAX_PLAYER_NAME];
                 GetPlayerName(i, pName, sizeof(pName));
                 format(string, 128, "%s was auto-banned for Money Cheat.", pName);
                 SendClientMessageToAll(COLOR_RED, string);
                Ban(i);
        }
            }
        }
    }
     return 1;
}
What's wrong?

error 010: invalid function or declaration
Reply
#2

Next time, please include the line of which the errors appears.

At any rate, the problem is you have an extra bracket.
pawn Код:
forward AntiMoney();
public AntiMoney()
{
for (new i = 0; i != MAX_PLAYERS; ++i)
{
  if (IsPlayerConnected(i))
    {
      if (GetPlayerMoney(i) > 9999998)
            {
                 SendClientMessage(i, 0xFFFFFF, "You forgot to pay the tax.");
                 new string[128];
                 new pName[MAX_PLAYER_NAME];
                 GetPlayerName(i, pName, sizeof(pName));
                 format(string, 128, "%s was auto-banned for Money Cheat.", pName);
                 SendClientMessageToAll(COLOR_RED, string);
                Ban(i);
            }
        }
    }
     return 1;
}
Reply
#3

wheres that line ?

EDIT: O grim got it i was abit late >.<
Reply
#4

Thanks and sorry for not posting the error line ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)