SA-MP Forums Archive
Need help with error 001 - 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: Need help with error 001 (/showthread.php?tid=481294)



Need help with error 001 - sidney123 - 15.12.2013

I've fixed this error myself. I forgot to close a function in the file which called government.pwn.

Hello all,

It's been a while since I've last touched my script and I thought that everything would be fine. I commented out useless crap and now I'm getting one error, but I can't see what it is really. It's very strange because this error showed up before I began commenting out useless crap.

pawn Код:
isGovernment(playerid) {
    new faction = GetPVarInt(playerid, "Faction");
    return getFactionType(faction) == EFactionType_Government;
}
This function can be used in commands to check if the player is really in the government faction.

This is the error code:
Код:
crp\factions\government.pwn(10) : error 001: expected token: "}", but found "-i
dentifier-"
This is the line:
pawn Код:
isGovernment(playerid) {
Note:
I didn't touch this file while commenting. All files are seperated.

Yours sincerely,
Sidney.


Re: Need help with error 001 - Voxel - 15.12.2013

Try this
pawn Код:
isGovernment(playerid)
{
    new faction = GetPVarInt(playerid, "Faction");
    getFactionType(faction) == EFactionType_Government;
    return 1;
}