warning 215: expression has no effect
#1

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
Reply
#2

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.
Reply
#3

Is to place the object, because the object of the deagle is therefore 348 + 324 wepid etc..
Reply
#4

You can just -

pawn Код:
new weaponID = GetPlayerWeapon(playerid);
weaponID += ( (23 < weaponID < 31) ? ( 324 ): 0);
Reply
#5

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 ^^
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)