warning 215: 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: warning 215: expression has no effect (
/showthread.php?tid=515901)
warning 215: expression has no effect -
TheSy - 28.05.2014
Hello
Why?
new wepId = GetPlayerWeapon(playerid);
pawn Код:
switch(wepId)
{
case 24: wepId+324; // eagle
case 25: wepId+324; // Shotgun
case 26: wepId+324; // canon sciй
case 27: wepId+324; // Fusil de Combat
case 28: wepId+324; // uzi
case 29: wepId+324; // mp5
case 30: wepId+325; // ak
}
THX
Re: warning 215: expression has no effect -
Konstantinos - 28.05.2014
Let's say wepId is 24 (deagle). What you basically do is: 24 + 324 which itself has no effect. You probably want to set something with it.
Re: warning 215: expression has no effect -
TheSy - 28.05.2014
Is to place the object, because the object of the deagle is therefore 348 + 324 wepid etc..
Re: warning 215: expression has no effect -
RajatPawar - 28.05.2014
You can just -
pawn Код:
new weaponID = GetPlayerWeapon(playerid);
weaponID += ( (23 < weaponID < 31) ? ( 324 ): 0);
Re: warning 215: expression has no effect -
TheSy - 28.05.2014
pawn Код:
switch(wepId)
{
case 24: wepId = wepId+324; // eagle
case 25: wepId = wepId+324; // Shotgun
case 26: wepId = wepId+324; // canon sciй
case 27: wepId = wepId+324; // Fusil de Combat
case 28: wepId = wepId+324; // uzi
case 29: wepId = wepId+324; // mp5
case 30: wepId = wepId+325; // ak
}
it's work ^^