Raised This Month: $12 Target: $400
 3% 

the plugin gives an error when compiling! can Authors help?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Darkwob
BANNED
Join Date: Oct 2018
Old 09-29-2020 , 05:57   the plugin gives an error when compiling! can Authors help?
Reply With Quote #1

I get these errors when I try to compile this add-in. What did I do wrong?

Quote:
/home/groups/sourcemod/upload_tmp/phpffl4wl.sp(86) : error 035: argument type mismatch (argument 3)
/home/groups/sourcemod/upload_tmp/phpffl4wl.sp(313) : error 029: invalid expression, assumed zero
/home/groups/sourcemod/upload_tmp/phpffl4wl.sp(314) : error 001: expected token: ":", but found "return"
/home/groups/sourcemod/upload_tmp/phpffl4wl.sp(314) : error 001: expected token: ",", but found ";"
/home/groups/sourcemod/upload_tmp/phpffl4wl.sp(62 : warning 234: symbol "GetClientAuthString" is marked as deprecated: Use GetClientAuthId

/home/groups/sourcemod/upload_tmp/phpffl4wl.sp(422) : warning 203: symbol is never used: "iKill"
/home/groups/sourcemod/upload_tmp/phpffl4wl.sp(14) : warning 203: symbol is never used: "bListDone"
PHP Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdkhooks>
#include <sdktools>

ConVar bhpDistancebhpMaxAttemptsbhpCoolTimebhpShowDamagebhpShowDistancebhpShowKills,
    
bhpAvgDistancebhpRankTypebhpListMaxbhpListType;

float fDistancefCoolTimefPouncePos[MAXPLAYERS+1][3];
int iMaxAttemptsiRankTypeiListMaxiListTypeiPounces[MAXPLAYERS+1], iPenalty[MAXPLAYERS+1],
    
iListPage[MAXPLAYERS+1] = 1;

Handle hPenaltyTime[MAXPLAYERS+1] = null;
bool bShowDamagebShowDistancebShowKillsbAvgDistancebShowPenalty[MAXPLAYERS+1], bListDone;
char sGame[12], sMap[64];

public 
APLRes AskPluginLoad2(Handle myselfbool latechar[] errorint err_max)
{
    
GetGameFolderName(sGamesizeof(sGame));
    if (!
StrEqual(sGame"left4dead"false) && !StrEqual(sGame"left4dead2"false))
    {
        
strcopy(errorerr_max"[BHP] Plugin Supports L4D And L4D2 Only!");
        return 
APLRes_SilentFailure;
    }
    
    return 
APLRes_Success;
}

public 
Plugin myinfo =
{
    
name "Brutal Hunter Pounce",
    
author "cravenge",
    
description "Makes Higher Pounces Deadly And Worth Taking.",
    
version "3.12",
    
url ""
};

public 
void OnPluginStart()
{
    
CreateConVar("brutal_hunter_pounce_version""3.12""Brutal Hunter Pounce Version"FCVAR_NOTIFY|FCVAR_SPONLY|FCVAR_DONTRECORD);
    
bhpDistance CreateConVar("brutal_hunter_pounce_distance""1750.0""Distance To Make Deadly Hunter Pounces"FCVAR_NOTIFY|FCVAR_SPONLYtrue1.0);
    
bhpMaxAttempts CreateConVar("brutal_hunter_pounce_max_attempts""2""Maximum Attempts Of Brutal Hunter Pounces"FCVAR_NOTIFY|FCVAR_SPONLY);
    
bhpCoolTime CreateConVar("brutal_hunter_pounce_cool_time""60.0""Cool Time For Every Smashing Hunter Pounce"FCVAR_NOTIFY|FCVAR_SPONLY);
    
bhpShowDamage CreateConVar("brutal_hunter_pounce_show_damage""1""Enable/Disable Damage Display"FCVAR_NOTIFY|FCVAR_SPONLYtrue0.0true1.0);
    
bhpShowDistance CreateConVar("brutal_hunter_pounce_show_distance""1""Enable/Disable Distance Display"FCVAR_NOTIFY|FCVAR_SPONLYtrue0.0true1.0);
    
bhpShowKills CreateConVar("brutal_hunter_pounce_show_kills""1""Enable/Disable Kills Display"FCVAR_NOTIFY|FCVAR_SPONLYtrue0.0true1.0);
    
bhpAvgDistance CreateConVar("brutal_hunter_pounce_avg_distance""1""Enable/Disable Average Distance"FCVAR_NOTIFY|FCVAR_SPONLYtrue0.0true1.0);
    
bhpRankType CreateConVar("brutal_hunter_pounce_rank_type""0""Rank Type: 0=By Kills, 1=By Damage, 2=By Distance"FCVAR_NOTIFY|FCVAR_SPONLYtrue0.0true1.0);
    
bhpListMax CreateConVar("brutal_hunter_pounce_list_max""10""Maximum Number Of Players To List In The Stats"FCVAR_NOTIFY|FCVAR_SPONLYtrue3.0true10.0);
    
bhpListType CreateConVar("brutal_hunter_pounce_list_type""1""Stats Listing Type: 0=All Players, 1=Top Players Only"FCVAR_NOTIFY|FCVAR_SPONLYtrue0.0true1.0);
    
    
fDistance bhpDistance.FloatValue;
    
fCoolTime bhpCoolTime.FloatValue;
    
    
iMaxAttempts bhpMaxAttempts.IntValue;
    
iRankType bhpRankType.IntValue;
    
iListMax bhpListMax.IntValue;
    
iListType bhpListType.IntValue;
    
    
bShowDamage bhpShowDamage.BoolValue;
    
bShowDistance bhpShowDistance.BoolValue;
    
bShowKills bhpShowKills.BoolValue;
    
bAvgDistance bhpAvgDistance.BoolValue;
    
    
bhpDistance.AddChangeHook(OnBHPCVarsChanged);
    
bhpMaxAttempts.AddChangeHook(OnBHPCVarsChanged);
    
bhpCoolTime.AddChangeHook(OnBHPCVarsChanged);
    
bhpShowDamage.AddChangeHook(OnBHPCVarsChanged);
    
bhpShowDistance.AddChangeHook(OnBHPCVarsChanged);
    
bhpShowKills.AddChangeHook(OnBHPCVarsChanged);
    
bhpAvgDistance.AddChangeHook(OnBHPCVarsChanged);
    
bhpRankType.AddChangeHook(OnBHPCVarsChanged);
    
bhpListMax.AddChangeHook(OnBHPCVarsChanged);
    
bhpListType.AddChangeHook(OnBHPCVarsChanged);
    
    
AutoExecConfig(true"brutal_hunter_pounce");
    
    
HookEvent("round_start"OnRoundEvents);
    
HookEvent("round_end"OnRoundEvents);
    
HookEvent("map_transition"OnRoundEvents);
    
    
HookEvent("ability_use"OnAbilityUse);
    
HookEvent("lunge_pounce"OnLungePounce);
    
    
RegConsoleCmd("sm_bhp_penalty"TogglePenalty"Toggles Penalty Notification");
    
RegConsoleCmd("sm_bhp_reset"ResetBHPADMFLAG_ROOT"Resets Brutal Pounce Count");
    
    
RegConsoleCmd("sm_bhp_list"ListBHP"Displays List Of Brutal Pounces Made");
    
RegConsoleCmd("sm_tophunters"ListBHP"Displays List Of Brutal Pounces Made");
}

public 
void OnBHPCVarsChanged(ConVar cvar, const char[] oldValue, const char[] newValue)
{
    
fDistance bhpDistance.FloatValue;
    
fCoolTime bhpCoolTime.FloatValue;
    
    
iMaxAttempts bhpMaxAttempts.IntValue;
    
iRankType bhpRankType.IntValue;
    
iListMax bhpListMax.IntValue;
    
iListType bhpListType.IntValue;
    
    
bShowDamage bhpShowDamage.BoolValue;
    
bShowDistance bhpShowDistance.BoolValue;
    
bShowKills bhpShowKills.BoolValue;
    
bAvgDistance bhpAvgDistance.BoolValue;
}

public 
Action TogglePenalty(int clientint args)
{
    if (
client == || !IsClientInGame(client))
    {
        return 
Plugin_Handled;
    }
    
    if (
bShowPenalty[client])
    {
        
bShowPenalty[client] = false;
    }
    else
    {
        
bShowPenalty[client] = true;
    }
    
PrintToChat(client"\x04Penalty Notification\x01: \x03%s", (bShowPenalty[client]) ? "On" "Off");
    return 
Plugin_Handled;
}

public 
Action ResetBHP(int clientint args)
{
    if (
client == || !IsClientInGame(client))
    {
        return 
Plugin_Handled;
    }
    
    
AdminId clientId GetUserAdmin(client);
    if (
clientId == INVALID_ADMIN_ID || iPounces[client] == 0)
    {
        
PrintToChat(client"\x03Invalid!\x01");
        return 
Plugin_Handled;
    }
    
    
PrintToChat(client"\x04Fatal Jump\x01 \x03Counts Reset!\x01");
    if (
hPenaltyTime[client] != null)
    {
        
hPenaltyTime[client] = null;
    }
    
    
iPounces[client] = 0;
    
iPenalty[client] = 0;
    
    return 
Plugin_Handled;
}

public 
Action ListBHP(int clientint args)
{
    if (
client == || !IsClientInGame(client))
    {
        return 
Plugin_Handled;
    }
    
    if (
iListPage[client] != 1)
    {
        
iListPage[client] = 1;
    }
    
BHPStats(client____iListPage[client]);
    
    return 
Plugin_Handled;
}

public 
void OnPluginEnd()
{
    
bhpDistance.RemoveChangeHook(OnBHPCVarsChanged);
    
bhpMaxAttempts.RemoveChangeHook(OnBHPCVarsChanged);
    
bhpCoolTime.RemoveChangeHook(OnBHPCVarsChanged);
    
bhpShowDamage.RemoveChangeHook(OnBHPCVarsChanged);
    
bhpShowDistance.RemoveChangeHook(OnBHPCVarsChanged);
    
bhpShowKills.RemoveChangeHook(OnBHPCVarsChanged);
    
bhpAvgDistance.RemoveChangeHook(OnBHPCVarsChanged);
    
bhpRankType.RemoveChangeHook(OnBHPCVarsChanged);
    
bhpListMax.RemoveChangeHook(OnBHPCVarsChanged);
    
bhpListType.RemoveChangeHook(OnBHPCVarsChanged);
    
    
delete bhpDistance;
    
delete bhpMaxAttempts;
    
delete bhpCoolTime;
    
delete bhpShowDamage;
    
delete bhpShowDistance;
    
delete bhpShowKills;
    
delete bhpAvgDistance;
    
delete bhpRankType;
    
delete bhpListMax;
    
delete bhpListType;
    
    
UnhookEvent("round_start"OnRoundEvents);
    
UnhookEvent("round_end"OnRoundEvents);
    
UnhookEvent("map_transition"OnRoundEvents);
    
    
UnhookEvent("ability_use"OnAbilityUse);
    
UnhookEvent("lunge_pounce"OnLungePounce);
}

public 
void OnMapStart()
{
    
GetCurrentMap(sMapsizeof(sMap));
}

public 
void OnRoundEvents(Event event, const char[] namebool dontBroadcast)
{
    if (
fDistance 1.0)
    {
        return;
    }
    
    for (
int i 1<= MaxClientsi++)
    {
        if (
IsClientInGame(i))
        {
            
iPounces[i] = 0;
            
iPenalty[i] = 0;
            
iListPage[i] = 1;
            
            
bShowPenalty[i] = true;
            
            for (
int i2 0i2 3i2++)
            {
                
fPouncePos[i][i2] = 0.0;
            }
            if (
hPenaltyTime[i] != null)
            {
                if (
StrEqual(sGame"left4dead2"false))
                {
                    
KillTimer(hPenaltyTime[i]);
                }
                
hPenaltyTime[i] = null;
            }
        }
    }
}

public 
void OnAbilityUse(Event event, const char[] namebool dontBroadcast)
{
    if (
fDistance <= 0.0)
    {
        return;
    }
    
    
int user GetClientOfUserId(event.GetInt("userid"));
    if (
user || !IsClientInGame(user) || GetClientTeam(user) != || GetEntProp(userProp_Send"m_zombieClass") != 3)
    {
        return;
    }
    
    
char sAbility[24];
    
event.GetString("ability"sAbility24);
    if (
StrEqual(sAbility"ability_lunge"false))
    {
        if (
iPounces[user] <= iMaxAttempts)
        {
            
GetClientAbsOrigin(userfPouncePos[user]);
        }
        
    }
}

public 
Action MakeFartherPounce(Handle timerany client)
{
    
KillTimer(timer);
    if (!
IsServerProcessing())
    {
        return 
Plugin_Stop;
    }
    
    
float fVelocity[3];
    
GetEntPropVector(clientProp_Data"m_vecVelocity"fVelocity);
    
    
fVelocity[0] *= 1.2;
    
fVelocity[1] *= 1.2;
    
fVelocity[2] *= 1.3;
    
    
TeleportEntity(clientNULL_VECTORNULL_VECTORfVelocity);
    return 
Plugin_Stop;
}

public 
void OnLungePounce(Event event, const char[] namebool dontBroadcast)
{
    if (
fDistance 1.0)
    {
        return;
    }
    
    
int pouncer GetClientOfUserId(event.GetInt("userid"));
    if (
pouncer || pouncer MaxClients || !IsClientInGame(pouncer) || GetClientTeam(pouncer) != || GetEntProp(pouncerProp_Send"m_zombieClass") != 3)
    {
        return;
    }
    
    
int pounced GetClientOfUserId(event.GetInt("victim"));
    if (
pounced || pounced MaxClients || !IsClientInGame(pounced) || GetClientTeam(pounced) != 2)
    {
        return;
    }
    
    
float fLandedPos[3];
    
GetClientAbsOrigin(pouncerfLandedPos);
    
    if (
GetVectorDistance(fPouncePos[pouncer], fLandedPos) < fDistance)
    {
        
PrintToChat(pouncer"\x04Fatal Jump\x01 \x03Failed!\x01 \x05(\x04%.1f\x05 / \x04%.1f\x05)"GetVectorDistance(fPouncePos[pouncer], fLandedPos), fDistance);
        return;
    }
    
    if (
iPounces[pouncer] > iMaxAttempts)
    {
        
PrintToChat(pouncer"\x03Maximum Limits Reached!\x01 \x04%s\x01", (GetUserAdmin(pouncer) == INVALID_ADMIN_ID) ? ;
        return;
    }
    
    if (
iPenalty[pouncer] > 0)
    {
        if (!
bShowPenalty[pouncer])
        {
            
PrintToChat(pouncer"\x04Fatal Jump\x01 For \x03Please Wait!\x01");
        }
        return;
    }
    
    
int iDmg = (GetEntProp(pouncedProp_Send"m_isIncapacitated"1)) ? GetClientHealth(pounced) : (GetClientHealth(pounced) + FindConVar("survivor_incap_health").IntValue);
    
BHPStats(pouncer1iDmgRoundFloat(GetVectorDistance(fPouncePos[pouncer], fLandedPos)), true);
    
    
Event ePlayerHurt CreateEvent("player_hurt"true);
    
ePlayerHurt.SetInt("userid"GetClientUserId(pounced));
    
ePlayerHurt.SetInt("attacker"GetClientUserId(pouncer));
    
ePlayerHurt.SetString("weapon""hunter_claw");
    
ePlayerHurt.SetInt("dmg_health"iDmg);
    
ePlayerHurt.Fire();
    
    if (!
GetEntProp(pouncedProp_Send"m_isIncapacitated"1) && GetEntProp(pouncedProp_Send"m_currentReviveCount") < FindConVar("survivor_max_incapacitated_count").IntValue)
    {
        
Event ePlayerIncapacitated CreateEvent("player_incapacitated"true);
        
ePlayerIncapacitated.SetInt("userid"GetClientUserId(pounced));
        
ePlayerIncapacitated.SetInt("attacker"GetClientUserId(pouncer));
        
ePlayerIncapacitated.SetString("weapon""hunter_claw");
        
ePlayerIncapacitated.Fire();
    }
    
ForcePlayerSuicide(pounced);
    
    
Event ePlayerDeath CreateEvent("player_death"true);
    
ePlayerDeath.SetInt("userid"GetClientUserId(pounced));
    
ePlayerDeath.SetInt("attacker"GetClientUserId(pouncer));
    
ePlayerDeath.SetString("weapon""hunter_claw");
    
ePlayerDeath.Fire();
    
    
iPounces[pouncer] += 1;
    
PrintToChat(pouncer"Your Hunter Kills In This Round: \x04(\x01\x03%d / %i\x01\x04)\x01"iPounces[pouncer], iMaxAttempts 1);
    
    if (
bShowDamage && bShowDistance)
    {
        
PrintToChatAll("\x03%N\x01 \x05Was\x01 Brutally Pounced \x05By\x01 \x03%N\x01 \x05From A Deadly Distance\x01 \x04[\x01%.2f\x04]\x01 \x05And Got His\x01 Spine Broken."pouncerpouncedGetVectorDistance(fPouncePos[pouncer], fLandedPos), iDmg);
    }
    else if (
bShowDamage)
    {
        
PrintToChatAll("\x03%N\x01 \x05Was\x01 Brutally Pounced \x05By\x01 \x03%N\x01 \x05From A Deadly Distance\x01 \x04[\x01%.2f\x04]\x01 \x05And Got His\x01 Spine Broken."pouncerpouncediDmg);
    }
    else if (
bShowDistance)
    {
        
PrintToChatAll("\x03%N\x01 \x05Was\x01 Brutally Pounced \x05By\x01 \x03%N\x01 \x05From A Deadly Distance\x01 \x04[\x01%.2f\x04]\x01 \x05And Got His\x01 Spine Broken."pouncerpouncedGetVectorDistance(fPouncePos[pouncer], fLandedPos));
    }
    else
    {
        
PrintToChatAll("\x03%N\x01 \x05Was\x01 Brutally Pounced \x05By\x01 \x03%N\x01 \x05From A Deadly Distance\x01 \x04[\x01%.2f\x04]\x01 \x05And Got His\x01 Spine Broken."pouncerpounced);
    }
    
    if (
hPenaltyTime[pouncer] == null)
    {
        
iPenalty[pouncer] = RoundToNearest(fCoolTime iPounces[pouncer]);
        
hPenaltyTime[pouncer] = CreateTimer(1.0ShowNextBPpouncerTIMER_FLAG_NO_MAPCHANGE|TIMER_REPEAT);
    }
}

public 
Action ShowNextBP(Handle timerany client)
{
    if (!
IsClientInGame(client))
    {
        if (
hPenaltyTime[client] != null)
        {
            if (
StrEqual(sGame"left4dead2"false))
            {
                
KillTimer(hPenaltyTime[client]);
            }
            
hPenaltyTime[client] = null;
        }
        return 
Plugin_Stop;
    }
    
    if (
hPenaltyTime[client] == null)
    {
        return 
Plugin_Stop;
    }
    
    if (
iPenalty[client] < 1)
    {
        
PrintToChat(client"\x05Again You Can Make\x01 \x04A Fatal Jump.\x01");
        
        if (
hPenaltyTime[client] != null)
        {
            if (
StrEqual(sGame"left4dead2"false))
            {
                
KillTimer(hPenaltyTime[client]);
            }
            
hPenaltyTime[client] = null;
        }
        return 
Plugin_Stop;
    }
    
    if (
bShowPenalty[client])
    {
        
PrintHintText(client"%d %s Before Next Fatal Jump!\nType !bhp_penalty To Toggle This Notification!"iPenalty[client], (iPenalty[client] == 1) ? "Second" "Seconds");
    }
    
iPenalty[client] -= 1;
    return 
Plugin_Continue;
}

void BHPStats(int clientint iKill 0int iDamage 0int iDistance 0bool bUpdate falseint iPage 1)
{
    
char sRequirePath[PLATFORM_MAX_PATH];
    
BuildPath(Path_SMsRequirePathsizeof(sRequirePath), "data/bhpstats");
    if (!
DirExists(sRequirePath))
    {
        
CreateDirectory(sRequirePathFPERM_O_READ|FPERM_O_WRITE|FPERM_O_EXEC);
    }
    
    
BuildPath(Path_SMsRequirePathsizeof(sRequirePath), "data/bhpstats/%s.txt"sMap);
    
KeyValues kvStats = new KeyValues("bhpstats");
    
    if (!
bUpdate)
    {
        if (!
kvStats.ImportFromFile(sRequirePath))
        {
            
PrintToChat(client"\x04[\x05SM\x04]\x01 No Saved Data!");
            
delete kvStats;
            
            return;
        }
        
        
kvStats.JumpToKey("pouncers");
        
int iTotal kvStats.GetNum("total"0);
        
        
decl String:bhpNames[iTotal][MAX_NAME_LENGTH];
        new 
bhpRecord[iTotal][4];
        
        
kvStats.GoBack();
        
kvStats.JumpToKey("records");
        
kvStats.GotoFirstSubKey();
        
        for (
int i 0iTotali++)
        {
            
kvStats.GetString("name"bhpNames[i], MAX_NAME_LENGTH"Unknown Player");
            
            
bhpRecord[i][0] = i;
            
bhpRecord[i][1] = kvStats.GetNum("kills"0);
            
bhpRecord[i][2] = kvStats.GetNum("dmg"0);
            
bhpRecord[i][3] = kvStats.GetNum("dist"0);
            
            
kvStats.GotoNextKey();
        }
        
        
SortCustom2D(bhpRecordiTotalBPRankSort);
        
        
Panel pStats = new Panel();
        
        
char sTitle[128];
        
Format(sTitlesizeof(sTitle), "BHP Stats: (%s)"sMap);
        
pStats.SetTitle(sTitle);
        
        
pStats.DrawText(" \n");
        
        
char sTextList[128];
        for (
int i = (iListType == && iPage 1) ? iListMax iPage 0iTotali++)
        {
            if (
bShowKills)
            {
                if (
bShowDamage && bShowDistance)
                {
                    if (
== 0)
                    {
                        if (
bAvgDistance)
                        {
                            
strcopy(sTextListsizeof(sTextList), "No.    Name    -  Kills  |  Damage  |  Avg. Distance");
                        }
                        else
                        {
                            
strcopy(sTextListsizeof(sTextList), "No.    Name    -  Kills  |  Damage  |  Distance");
                        }
                        
pStats.DrawText(sTextList);
                    }
                    
Format(sTextListsizeof(sTextList), "%i. %s - %d | %d | %d"1bhpNames[bhpRecord[i][0]], bhpRecord[i][1], bhpRecord[i][2], bhpRecord[i][3]);
                }
                else if (
bShowDamage)
                {
                    if (
== 0)
                    {
                        
strcopy(sTextListsizeof(sTextList), "No.    Name    -  Kills  |  Damage");
                        
pStats.DrawText(sTextList);
                    }
                    
Format(sTextListsizeof(sTextList), "%i. %s - %d | %d"i+1bhpNames[bhpRecord[i][0]], bhpRecord[i][1], bhpRecord[i][2]);
                }
                else if (
bShowDistance)
                {
                    if (
== 0)
                    {
                        if (
bAvgDistance)
                        {
                            
strcopy(sTextListsizeof(sTextList), "No.    Name    -  Kills  |  Avg. Distance");
                        }
                        else
                        {
                            
strcopy(sTextListsizeof(sTextList), "No.    Name    -  Kills  |  Distance");
                        }
                        
pStats.DrawText(sTextList);
                    }
                    
Format(sTextListsizeof(sTextList), "%i. %s - %d | %d"i+1bhpNames[bhpRecord[i][0]], bhpRecord[i][1], bhpRecord[i][3]);
                }
                else
                {
                    if (
== 0)
                    {
                        
strcopy(sTextListsizeof(sTextList), "No.    Name    -  Kills");
                        
pStats.DrawText(sTextList);
                    }
                    
Format(sTextListsizeof(sTextList), "%i. %s - %d"1bhpNames[bhpRecord[i][0]], bhpRecord[i][1]);
                }
            }
            else
            {
                if (
bShowDamage && bShowDistance)
                {
                    if (
== 0)
                    {
                        if (!
bAvgDistance)
                        {
                            
strcopy(sTextListsizeof(sTextList), "No.    Name    -  Damage  |  Distance");
                        }
                        else
                        {
                            
strcopy(sTextListsizeof(sTextList), "No.    Name    -  Damage  |  Avg. Distance");
                        }
                        
pStats.DrawText(sTextList);
                    }
                    
Format(sTextListsizeof(sTextList), "%i. %s - %d | %d"1bhpNames[bhpRecord[i][0]], bhpRecord[i][2], bhpRecord[i][3]);
                }
                else if (
bShowDamage)
                {
                    if (
== 0)
                    {
                        
strcopy(sTextListsizeof(sTextList), "No.    Name    -  Damage");
                        
pStats.DrawText(sTextList);
                    }
                    
Format(sTextListsizeof(sTextList), "%i. %s - %d"1bhpNames[bhpRecord[i][0]], bhpRecord[i][2]);
                }
                else if (
bShowDistance)
                {
                    if (
== 0)
                    {
                        if (!
bAvgDistance)
                        {
                            
strcopy(sTextListsizeof(sTextList), "No.    Name    -  Distance");
                        }
                        else
                        {
                            
strcopy(sTextListsizeof(sTextList), "No.    Name    -  Avg. Distance");
                        }
                        
pStats.DrawText(sTextList);
                    }
                    
Format(sTextListsizeof(sTextList), "%i. %s - %d"1bhpNames[bhpRecord[i][0]], bhpRecord[i][3]);
                }
                else
                {
                    if (
== 0)
                    {
                        
strcopy(sTextListsizeof(sTextList), "No.    Name    ");
                        
pStats.DrawText(sTextList);
                    }
                    
Format(sTextListsizeof(sTextList), "%i. %s"1bhpNames[bhpRecord[i][0]]);
                }
            }
            
pStats.DrawText(sTextList);
            
            if (
>= (iListMax iPage) - || >= iTotal)
            {
                
pStats.DrawText(" \n");
                
                if (
iListType != 1)
                {
                    if (
iPage 1)
                    {
                        
pStats.DrawItem("Back");
                    }
                    
                    if (
iListMax iTotal)
                    {
                        
pStats.DrawItem("Next");
                    }
                    
pStats.DrawText(" \n");
                }
                
                break;
            }
        }
        
        
Format(sTextListsizeof(sTextList), "%d Brutal %s Recorded On This Map!"iTotal, (iTotal 1) ? "Pouncers" "Pouncer");
        
pStats.DrawText(sTextList);
        
        
pStats.Send(clientpStatsHandler20);
        
delete pStats;
    }
    else
    {
        
char sFileVersion[16];
        
kvStats.GetString("Version"sFileVersionsizeof(sFileVersion), "0.0");
        if (
FileExists(sRequirePath) && !StrEqual(sFileVersion"3.12"false))
        {
            
DeleteFile(sRequirePath);
        }
        
        
char sName[MAX_NAME_LENGTH], sSteamID[32];
        
int iTotaliTotalKilliTotalDmgiTotalDist;
        
        
GetClientName(clientsNamesizeof(sName));
        
GetClientAuthString(clientsSteamIDsizeof(sSteamID));
        
        
kvStats.ImportFromFile(sRequirePath);
        
kvStats.SetString("version""3.12");
        
kvStats.JumpToKey("records"true);
        
        if (!
kvStats.JumpToKey(sSteamID))
        {
            
kvStats.GoBack();
            
kvStats.JumpToKey("pouncers"true);
            
            
iTotal kvStats.GetNum("total"0);
            
iTotal += 1;
            
            
kvStats.SetNum("total"iTotal);
            
kvStats.GoBack();
            
            
kvStats.JumpToKey("records");
            
kvStats.JumpToKey(sSteamIDtrue);
        }
        
        
kvStats.SetString("name"sName);
        
        
iTotalKill kvStats.GetNum("kills"0);
        
iTotalKill += 1;
        
        
kvStats.SetNum("kills"iTotalKill);
        
        
iTotalDmg kvStats.GetNum("dmg"0);
        
iTotalDmg += iDamage;
        
        
kvStats.SetNum("dmg"iTotalDmg);
        
        
iTotalDist kvStats.GetNum("dist"0);
        
iTotalDist += iDistance;
        
        if (
bAvgDistance)
        {
            
kvStats.SetNum("dist"RoundFloat(float(iTotalDist) / float(iTotalKill)));
        }
        else
        {
            
kvStats.SetNum("dist"iTotalDist);
        }
        
        
kvStats.Rewind();
        
kvStats.ExportToFile(sRequirePath);
    }
    
    
delete kvStats;
}

public 
int BPRankSort(int[] array1int[] array2, const int[][] completeArrayHandle hndl)
{
    if (
array1[iRankType+1] > array2[iRankType+1])
    {
        return -
1;
    }
    
    if (
array1[iRankType+1] == array2[iRankType+1])
    {
        return 
0;
    }
    
    return 
1;
}

public 
int pStatsHandler(Menu menuMenuAction actionint param1int param2)
{
    if (
action == MenuAction_Select && iListType != 0)
    {
        if (
param1 && param1 <= MaxClients && IsClientInGame(param1))
        {
            
iListPage[param1] += (param2 == 1) ? : (-1);
            
BHPStats(param1____iListPage[param1]);
        }
    }


Last edited by Darkwob; 09-29-2020 at 09:09.
Darkwob is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 09-29-2020 , 09:11   Re: the plugin gives an error when compiling! Can anyone help us ?
Reply With Quote #2

Code:
(86) : error 035: argument type mismatch (argument 3)

RegConsoleCmd("sm_bhp_reset", ResetBHP, ADMFLAG_ROOT, "Resets Brutal Pounce Count");
It's RegAdminCmd

However, SourceMod is flexible, you can avoid editing plugin source code for changing command to admin commands. Use admin_overrides.cfg configure file.
"sm_bhp_reset" "z"

Code:
(313) : error 029: invalid expression, assumed zero
(314) : error 001: expected token: ":", but found "return"
(314) : error 001: expected token: ",", but found ";


		if (GetVectorDistance(fPouncePos[pouncer], fLandedPos) < fDistance)
	{
		PrintToChat(pouncer, "\x04Fatal Jump\x01 \x03Failed!\x01 \x05(\x04%.1f\x05 / \x04%.1f\x05)", GetVectorDistance(fPouncePos[pouncer], fLandedPos), fDistance);
		return;
	}
	
	if (iPounces[pouncer] > iMaxAttempts)
	{
		PrintToChat(pouncer, "\x03Maximum Limits Reached!\x01 \x04%s\x01", (GetUserAdmin(pouncer) == INVALID_ADMIN_ID) ? ;
		return;
	}
	
	if (iPenalty[pouncer] > 0)
	{
		if (!bShowPenalty[pouncer])
		{
			PrintToChat(pouncer, "\x04Fatal Jump\x01 For \x03Please Wait!\x01");
		}
		return;
	}
You have open parentheses ( and conditional operator (?), but without expressions.
__________________
Do not Private Message @me
Bacardi is offline
Darkwob
BANNED
Join Date: Oct 2018
Old 09-29-2020 , 13:34   Re: the plugin gives an error when compiling! can Authors help?
Reply With Quote #3

thank you. I solved the problem.
Darkwob is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode