SA-MP Forums Archive
Little bit of help :D - 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: Little bit of help :D (/showthread.php?tid=136984)



Little bit of help :D - ScottCFR - 27.03.2010

I can't figure out why this wont work.

pawn Код:
case 0:
(703)       {
(704)           if(gTeam(playerid) == 2);
(705)           {
(706)               ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "Police Arms","Shotgun\nSMG\nM4\nArmour");
(708)           }
        }
and i get these errors:
Код:
(704) : error 012: invalid function call, not a valid address
(704) : warning 215: expression has no effect
(704) : error 001: expected token: ";", but found ")"
(704) : error 029: invalid expression, assumed zero
(704) : fatal error 107: too many error messages on one line



Re: Little bit of help :D - Carlton - 27.03.2010

if statements don't have a semicolon in front of it. Also your Dialog does not have enough parameters used.


Re: Little bit of help :D - ScottCFR - 27.03.2010

I fixed the dialog but i get this:
Код:
(704) : error 012: invalid function call, not a valid address
(704) : warning 215: expression has no effect
(704) : error 001: expected token: ";", but found ")"
(704) : error 029: invalid expression, assumed zero
(704) : fatal error 107: too many error messages on one line



Re: Little bit of help :D - Anwix - 27.03.2010

pawn Код:
case 0:
{
    if(gTeam(playerid) == 2) {
        ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "Police Arms","Shotgun\nSMG\nM4\nArmour", "Submit", "Cancel");
    }
}



Re: Little bit of help :D - MPKaboose - 27.03.2010

pawn Код:
if(gTeam(playerid) == 2) //you don't need a ; after if statements



Re: Little bit of help :D - ScottCFR - 27.03.2010

I got it. I replaced (playerid) with [playerid] and it works now. Thanks for the attempted help


Re: Little bit of help :D - MPKaboose - 27.03.2010

Quote:
Originally Posted by ScottCFR
I got it. I replaced (playerid) with [playerid] and it works now. Thanks for the attempted help
and that I haven't noticed that nor Anwix xD