SA-MP Forums Archive
2 warnings on my makeleader command - 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: 2 warnings on my makeleader command (/showthread.php?tid=404134)



2 warnings on my makeleader command - Oscii - 01.01.2013

Hello.

I've recently found 2 warnings on my /makeleader command!, anyone know the problem here?

warning 215: expression has no effect
warning 215: expression has no effect

these are the two warnings.

THe two lines are below. Both in same order.
pawn Код:
playerVariables[playerid][Faction] == factionid;
playerVariables[playerid][Rank] == 6;
Anyone know the solution?


AW: 2 warnings on my makeleader command - IPrototypeI - 01.01.2013

Quote:
Originally Posted by Oscii
Посмотреть сообщение
Hello.

I've recently found 2 warnings on my /makeleader command!, anyone know the problem here?

warning 215: expression has no effect
warning 215: expression has no effect

these are the two warnings.

THe two lines are below. Both in same order.
pawn Код:
playerVariables[playerid][Faction] == factionid;
playerVariables[playerid][Rank] == 6;
Anyone know the solution?
== and = are some different operator

You use == by if statements
and = to set one value to an other value.

PHP код:
playerVariables[playerid][Faction] = factionid;
playerVariables[playerid][Rank] = 6



Re: 2 warnings on my makeleader command - Laure - 02.01.2013

As the above comment states, "==" checks something if it is equal to or not to set you may use "=" instead.