invalid function? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: invalid function? (
/showthread.php?tid=215848)
invalid function? -
Face9000 - 24.01.2011
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
Re: invalid function? -
Grim_ - 24.01.2011
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;
}
Re: invalid function? -
Lorenc_ - 24.01.2011
wheres that line ?
EDIT: O grim got it i was abit late >.<
Re: invalid function? -
Face9000 - 24.01.2011
Thanks and sorry for not posting the error line ^^