Small problem - 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: Small problem (
/showthread.php?tid=514910)
Small problem -
Shank - 23.05.2014
Okay so, here is the line where I get all the errors
Код:
else if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 6)
Код:
\gamemodes\crp.pwn(6602) : error 001: expected token: ";", but found "if"
\gamemodes\crp.pwn(6602) : error 029: invalid expression, assumed zero
How do I remove these two errors?
Re: Small problem -
jamiesage123 - 23.05.2014
Looks like your problems within DynamicFactions[PlayerInfo[playerid][pFaction]][fType].
(Format ArrayName[Variable][Variable], your array is like ArrayName[Variable[Variable][Variable]][Variable] which isn't the right syntax.)
Try this:
pawn Код:
else if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[pFaction][fType] == 6)
Not sure if pFaction and fType will be the correct variables for that array, but that's definitely your problem.
If you're new to arrays, try having a look at this:
https://sampforum.blast.hk/showthread.php?tid=318212