OnPlayerTakeDamage - error
#1

I've this error with this code:
Code:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{

 if(issuerid != INVALID_PLAYER_ID && IsPlayerConnectedEx(issuerid))
 {

   if(tazer_out[issuerid])
  {

   if(GetPlayerWeapon(issuerid) == WEAPON_SILENCED)
   {

       if(GetDistanceBetweenPlayers(issuerid,playerid) < 10.0)
       {

        TazePlayer(issuerid,playerid);

    }

   }

  }

 }
 if(issuerid != INVALID_PLAYER_ID)
 {

     if(amount > 5.0 && weaponid != 0)
     {

         new Float:armor;
   GetPlayerArmour(playerid,armor);
   if(armor <= 0.0)
   {

          //TextDrawShowForPlayer(playerid,crash_screen);
          //SetTimerEx("HideCrash",250,0,"i",playerid);
          //SetPlayerDrunkLevel(playerid,(GetPlayerDrunkLevel(playerid) + 4000));

     }

     }

 }
 {
 if(issuerid == INVALID_PLAYER_ID) return 1;
 new Float:health,Float:armour;
 GetPlayerHealth(playerid,health);
 GetPlayerArmour(playerid,armour);
 new damage = 0;
 switch(weaponid)
 {
 case 22: damage = 58;
 }
 case 24: damage = 96;
 case 25:
 {
 if(amount < 45) damage = floatround(amount);
 else damage = 100 + floatround(amount);
 }
 case 27:
 {
 if(amount < 35) damage = floatround(amount);
 else damage = 100 + floatround(amount);
 }
 case 28: damage = 16;
 case 29: damage = 26;
 case 30: damage = 49;
 case 31: damage = 44;
 case 32: damage = 16;
 case 33: damage = 59;
 case 34: damage = 341;
 default: damage = floatround(amount);
}
}
C:\Users\Luca\Desktop\Server\rp.pwn(15257) : error 014: invalid statement; not in switch
C:\Users\Luca\Desktop\Server\rp.pwn(15257) : warning 215: expression has no effect
C:\Users\Luca\Desktop\Server\rp.pwn(15257) : error 001: expected token: ";", but found ":"
C:\Users\Luca\Desktop\Server\rp.pwn(15257) : error 029: invalid expression, assumed zero
C:\Users\Luca\Desktop\Server\rp.pwn(15257) : fatal error 107: too many error messages on one line
Reply


Messages In This Thread
OnPlayerTakeDamage - error - by Davman - 28.03.2013, 20:50
Re: OnPlayerTakeDamage - error - by Konstantinos - 28.03.2013, 20:56
Re: OnPlayerTakeDamage - error - by Davman - 28.03.2013, 22:24
Re: OnPlayerTakeDamage - error - by dannyk0ed - 28.03.2013, 22:52
Re: OnPlayerTakeDamage - error - by Konstantinos - 29.03.2013, 10:46
Re: OnPlayerTakeDamage - error - by Davman - 29.03.2013, 15:32
Re: OnPlayerTakeDamage - error - by Konstantinos - 29.03.2013, 18:35

Forum Jump:


Users browsing this thread: 5 Guest(s)