(5309) : error 025: function heading differs from prototype
#1

PHP код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
    new 
string[128];
    if(
GetPlayerWeapon(Shooter) == 34 && PlayerInfo[Shooter][pScope] && Hitman[Shooter] == Target)
    {
        
SetPlayerHealth(Target0);
        if(
Hitman[Shooter] == Target)
        {
            
format(stringsizeof(string), " You have been critically injured by a hitman and lost $%d, the contrat on your head was cleared."PlayerInfo[Target][pContract]/2);
            
SendClientMessage(TargetCOLOR_YELLOWstring);
            
format(stringsizeof(string), "HitmanWarn: %s has fulfilled the contract on %s's head and collected $%d."RPN(Shooter), RPN(Target), PlayerInfo[Target][pContract]/2);
            
SendHitmanMessage(COLOR_YELLOWstring);
            
GiveDodMoney(Target, -PlayerInfo[Target][pContract]/2);
            
GiveDodMoney(ShooterPlayerInfo[Target][pContract]/2);
            
PlayerInfo[Target][pContract] = 0;
            
format(PlayerInfo[Target][pContract], 32"");
            
Hitman[Shooter] = -1;
            
PlayerInfo[Shooter][pCSuccess] ++;
        }
        
PlayerInfo[Shooter][pScope] --;
    }
    if(!
IsACop(Shooter) || !IsNG(Shooter) || !IsFBI(Shooter))
    {
        if(
Tazer[Shooter])
        {
            if(
GetPlayerWeapon(Shooter) == 23)
            {
                if(!
IsPlayerTazed(Target) && !IsPlayerCuffed(Target) && !IsPlayerTied(Target))
                {
                    new 
Float:HPFloat:Armor;
                    
GetPlayerHealth(TargetHP);
                    
GetPlayerArmour(TargetArmor);
                    
SetPlayerHealth(TargetHealthLost+HP);
                    
SetPlayerArmour(TargetArmourLost+Armor);
                    if(!
IsPlayerNearPlayer(ShooterTarget15)) return SendClientMessage(ShooterCOLOR_GREY"You are too far away from that player.");
                    
// Got Tazed
                    
format(stringsizeof(string), "* %s aims his tazer on %s and tazes him."RPN(Shooter), RPN(Target));
                    
SendNearbyMessage(Shooter15stringCOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLE);
                    
GameTextForPlayer(Target"~r~Tazed"35003);
                    
TogglePlayerControllable(Target0);
                    
// Tazed Detecting
                    
TogglePlayerTazed(Target1);
                    
// Tazer Timeout
                    
TazeTimeout[Target] = 11;
                    
TazeCountDown[Target] = SetTimerEx("TazeTimer"1000true"d"Target);
                }
            }
        }
    }
    return 
1;

Reply
#2

Which is line 5309?
Reply
#3

Dear Drake,

The problem is that "OnPlayerShootPlayer(Shooter,Target,Float:HealthLos t,Float:ArmourLost)" is not correct.

Put the same "OnPlayerShootPlayer" you forwarded it.
Reply
#4

Find
pawn Код:
forward OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
and
pawn Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost) { .... }
These 2 should be exactly the same.
Reply
#5

Quote:
Originally Posted by Red_Dragon.
Посмотреть сообщение
Which is line 5309?
This is the line where i get the error public
PHP код:
OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost
Reply
#6

Quote:
Originally Posted by DrLozer
Посмотреть сообщение
Dear Drake,

The problem is that "OnPlayerShootPlayer(Shooter,Target,Float:HealthLos t,Float:ArmourLost)" is not correct.

Put the same "OnPlayerShootPlayer" you forwarded it.
I dont get it,,,
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)