SA-MP Forums Archive
error 010: invalid function or declaration with public variable? - 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)
+--- Thread: error 010: invalid function or declaration with public variable? (/showthread.php?tid=403377)



error 010: invalid function or declaration with public variable? - MrSnapp - 30.12.2012

Error: error 010: invalid function or declaration

Lines: On the main lines such as if, else if etc.

Code:
pawn Код:
public OnPlayerCheat(playerid, cheatid) / / If a player cheat
{
    if(cheatid==1)
    {
        SendClientMessage(playerid,COL_RED,"[ELC_AC]You tried to cheater .(CHEAT MONEY).");
    }
    else if(cheatid==2)
    {
        SendClientMessage(playerid,COL_RED,"[ELC_AC]You tried to cheater .(CHEAT WEAPON)");
    }
    else if(cheatid==3)
    {
        SendClientMessage(playerid,COL_RED,"[ELC_AC]You tried to cheater .(CHEAT AMMO)");
    }
    else if(cheatid==4)
    {
        SendClientMessage(playerid,COL_RED,"[ELC_AC]You tried to cheater .(CHEAT BLOCK AMMO)");
    }
    else if(cheatid==5)
    {
        SendClientMessage(playerid,COL_RED,"[ELC_AC]You tried to cheater .(CHEAT SPEEDHACK)");
    }
    else if(cheatid==6)
    {
        SendClientMessage(playerid,COL_RED,"[ELC_AC]You tried to cheater .(CHEAT AIBREAK/TELEPORT)");
    }
    else if(cheatid==7)
    {
        SendClientMessage(playerid,COL_RED,"[ELC_AC]You tried to cheater .(CHEAT HEALTH)");
    }
    else if(cheatid==8)
    {
        SendClientMessage(playerid,COL_RED,"[ELC_AC]You tried to cheater .(CHEAT ARMOUR)");
    }
    return 1;
}
Thanks


Re: error 010: invalid function or declaration with public variable? - MrSnapp - 30.12.2012

Nevermind. Got it.