Why wont this work? - 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: Why wont this work? (
/showthread.php?tid=366227)
Why wont this work? -
Dan. - 05.08.2012
pawn Код:
if(!strcmp(teamname, "England" || "Iraq" || "Russia" || "Mexico", true))
And error:
pawn Код:
error 001: expected token: "-string end-", but found "-identifier-"
I am using sscanf, and I want to check if the parameter the player entered matches one of these team names.
Re: Why wont this work? -
SA-MPDrifter - 05.08.2012
You forgot to add ; to the end of the line, that should fix it.
Re: Why wont this work? -
Dan. - 05.08.2012
No..
pawn Код:
//
if(!strcmp(teamname, "England" || "Iraq" || "Russia" || "Mexico", true))
{
}
If I add an ; to the line, then following code in the brackets wont execute I think.
Re: Why wont this work? -
Dan. - 06.08.2012
BUMP! Also this is giving the same error:
pawn Код:
//
if(teamname == "England" || teamname == "england")
{
}