SA-MP Forums Archive
Problem OnPlayerGiveDamage - 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: Problem OnPlayerGiveDamage (/showthread.php?tid=617469)



Problem OnPlayerGiveDamage - Mititel - 21.09.2016

Код:
C:\Users\vld\Desktop\gamemode\gamemode\rpg.pwn(9174) : warning 202: number of arguments does not match definition
C:\Users\vld\Desktop\gamemode\gamemode\rpg.pwn(9174) : warning 202: number of arguments does not match definition
C:\Users\vld\Desktop\gamemode\gamemode\rpg.pwn(9179) : warning 202: number of arguments does not match definition
C:\Users\vld\Desktop\gamemode\gamemode\rpg.pwn(9179) : warning 202: number of arguments does not match definition
C:\Users\vld\Desktop\gamemode\gamemode\rpg.pwn(9187) : warning 217: loose indentation
C:\Users\vld\Desktop\gamemode\gamemode\rpg.pwn(9294) : warning 209: function "OnPlayerGiveDamage" should return a value
C:\Users\vld\Desktop\Aici este gamemodeul\gamemode\rpg.pwn(9295) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
http://pastebin.com/qaFu7GWi


Re: Problem OnPlayerGiveDamage - Crystallize - 21.09.2016

Код:
if(damagedid != INVALID_PLAYER_ID)
    {
        PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
        if(PlayerData[playerid][SpectateP] != -1) PlayerPlaySound(PlayerData[playerid][SpectateP],17802,0.0,0.0,0.0);
       
        new s[128];
        format(s, 128, "+ %.0f HP to %s(%d) using %s", amount, PlayerData[damagedid][Name], damagedid, GetWeaponNameEx(weaponid));
        PlayerTextDrawSetString(playerid, GiveDamage, s);
        PlayerTextDrawShow(playerid, GiveDamage);
        SetTimerEx("HideDamageTD", 2000, false, "i", playerid);
   
        format(s, 128, "- %.0f HP from %s(%d) using %s", amount, PlayerData[playerid][Name], playerid, GetWeaponNameEx(weaponid));
        PlayerTextDrawSetString(damagedid, TakeDamage, s);
        PlayerTextDrawShow(damagedid, TakeDamage);
        SetTimerEx("HideDamageTD", 2000, false, "i", damagedid);
       
        SetPlayerChatBubble(damagedid, s, 0xE81010FF, 100.0, 2000);
}
        return 1;
    }



Re: Problem OnPlayerGiveDamage - Mititel - 22.09.2016

Quote:
Originally Posted by Crystallize
Посмотреть сообщение
Код:
if(damagedid != INVALID_PLAYER_ID)
    {
        PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
        if(PlayerData[playerid][SpectateP] != -1) PlayerPlaySound(PlayerData[playerid][SpectateP],17802,0.0,0.0,0.0);
       
        new s[128];
        format(s, 128, "+ %.0f HP to %s(%d) using %s", amount, PlayerData[damagedid][Name], damagedid, GetWeaponNameEx(weaponid));
        PlayerTextDrawSetString(playerid, GiveDamage, s);
        PlayerTextDrawShow(playerid, GiveDamage);
        SetTimerEx("HideDamageTD", 2000, false, "i", playerid);
   
        format(s, 128, "- %.0f HP from %s(%d) using %s", amount, PlayerData[playerid][Name], playerid, GetWeaponNameEx(weaponid));
        PlayerTextDrawSetString(damagedid, TakeDamage, s);
        PlayerTextDrawShow(damagedid, TakeDamage);
        SetTimerEx("HideDamageTD", 2000, false, "i", damagedid);
       
        SetPlayerChatBubble(damagedid, s, 0xE81010FF, 100.0, 2000);
}
        return 1;
    }
Same error/warnings.


Re: Problem OnPlayerGiveDamage - Shinja - 22.09.2016

Just say the lines