expression has no effect - 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: expression has no effect (
/showthread.php?tid=418453)
expression has no effect -
Salim_Karaja - 24.02.2013
code:
(vallowed == 1 && IsPlayerInAnyVehicle(playerid)) ? (SetVehiclePos(vid, x, y, z)) : (SetPlayerPos(playerid, x, y, z));
Re: expression has no effect -
SuperViper - 24.02.2013
You can't use the ternary operator for this type of thing. You'll need to do it the normal way.
Re: expression has no effect -
Misiur - 24.02.2013
pawn Код:
new _yay = (vallowed == 1 && IsPlayerInAnyVehicle(playerid)) ? SetVehiclePos(vid, x, y, z) : SetPlayerPos(playerid, x, y, z);
#pragma unused _yay
Doesn't make sense, better write normal if/else statement