Raised This Month: $ Target: $400
 0% 

[HELP] Error Complete 2


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
B7PK
Member
Join Date: Apr 2016
Location: palestine
Old 05-05-2016 , 16:30   [HELP] Error Complete 2
Reply With Quote #1

Hello guys i dont understand what is Error in this cod but is not complete :/

Code:
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <nvault>

/* ZP Includes */
#include <zp50_core>
#include <zp50_class_nemesis>
#include <zp50_class_survivor>

/* Plugin API */
#include <zp50simplexp>

/* Classes */
enum _:CLASSES
{
    
None,
    
CLASS_HUMAN,
    
CLASS_ZOMBIE
}

/* Xp Data */
enum _:XPData
{
    Class,
    
Level,
    
XP[CLASSES]
}

/* Level XP */
new const g_iLevelXP[LEVELS][2] =
{
    {
049}, {5099}, {100149}, {150299}, {200249}, {250299}, {300349}, {350399}, {400449}, {450499}, 
    {
500549}, {550599}, {600649}, {650599}, {700749}, {750799}, {800849}, {850899}, {900949},{950999},
    {
10001049}, {10501099}, {11001149}, {11501199}, {12001249}, {12501299}, {13001349}, {13501399}, {14001449}, {14501499},
    {
15001549},  {15501599}, {16001649}, {16501699}, {17001749}, {17501799}, {18001849}, {18501899}, {19001949}, {19501999},
    {
20002049}, {20502099}, {21002149}, {21502199}, {22002249}, {22502299}, {23002349}, {23502399}, {24002449}, {24502499},
    {
25002549}, {25502599}, {26002649}, {26502699}, {27002749}, {27502799}, {28002849}, {28502899}, {29002949}, {29502999},
    {
30003049}, {30503099}, {31003149}, {31503199}, {32003249}, {32503299}, {33003349}, {33503399}, {34003449}, {34503499},
    {
35003549}, {35503599}, {36003649}, {36503699}, {37003749}, {37503799}, {38003849}, {38503899}, {39003949}, {39503999},
    {
40004049}, {40504099}, {41004149}, {41504199}, {42004249}, {42504299}, {43004349}, {43504399}, {44004449}, {44504499},
    {
45004549}, {45504599}, {46004649}, {46504699}, {47004749}, {47504799}, {48004849}, {48504899}, {49004949}, {49505000}
}

/* Level Names */
new const g_szLevelDesc[LEVELS][] =
{
    
"Rookie""Member""Madness""Blackness""darckness""slayer""Killer""Jumper""Master""Level 10",
    
"Level 11""Level 12""Level 13""Level 14""Level 15""Level 16""Level 17""Level 18""Level 19""Level 20",
    
"Level 21""Level 22""Level 23""Level 24""Level 25""Level 26""Level 27""Level 28""Level 29""Level 30",
    
"Level 31""Level 32""Level 33""Level 34""Level 35""Level 36""Level 37""Level 38""Level 39""Level 40",
    
"Level 41""Level 42""Level 43""Level 44""Level 45""Level 46""Level 47""Level 48""Level 49""Level 50",
    
"Level 51""Level 52""Level 53""Level 54""Level 55""Level 56""Level 57""Level 58""Level 59""Level 60",
    
"Level 61""Level 62""Level 63""Level 64""Level 65""Level 66""Level 67""Level 68""Level 69""Level 70",
    
"Level 71""Level 72""Level 73""Level 74""Level 75""Level 76""Level 77""Level 78""Level 79""Level 80",
    
"Level 81""Level 82""Level 83""Level 84""Level 85""Level 86""Level 87""Level 88""Level 89""Level 90",
    
"Level 91""Level 92""Level 93""Level 94""Level 95""Level 96""Level 97""Level 98""Level 99""Max Level"
}

new const 
g_szClassDesc[CLASSES][] =
{
    
"None""Human""Zombie"
}

/* Plugin Constants */
const MAXPLAYERS 32;
const 
TASK_SHOWINFO 55271;

/* Hud Sync Object */
new g_SyncHudObj;

/* Player Variables */
new g_XP[MAXPLAYERS+1][XPData];
new 
g_szAuthID[MAXPLAYERS+1][32];

/* Vault Variable */
new g_iVault;

/* Plugin ConVars */
new g_Cvar_Base_XPg_Cvar_Nem_XPg_Cvar_Surv_XP;
new 
g_Cvar_HUD_Redg_Cvar_HUD_Greeng_Cvar_HUD_Blueg_Cvar_HUD_Xposg_Cvar_HUD_Ypos;

public 
plugin_init()
{
    
/* Register the Plugin with AMX ModX */
    
register_plugin("[ZP50] Addon: Simple XP System""0.0.2""Cata + Sav");
    
    
/* Register Player Death Event */
    
RegisterHam(Ham_Spawn"player""fwd_PlayerSpawn");
    
RegisterHam(Ham_Killed"player""fwd_PlayerKilled");
    
    
/* Create Hud Sync Object */
    
g_SyncHudObj CreateHudSyncObj();
    
    
/* Create the Plugins ConVars */
    
g_Cvar_Base_XP register_cvar("zp_base_xp""1"); /* Base Experience gained per kill */
    
g_Cvar_Nem_XP register_cvar("zp_nem_xp""2"); /* Bonus XP for killing Nem */
    
g_Cvar_Surv_XP register_cvar("zp_surv_xp""2"); /* Bonus XP for killing a Survivor */
    
    /* HUD Setting ConVars */
    
g_Cvar_HUD_Red register_cvar("zp_hud_red""255");
    
g_Cvar_HUD_Green register_cvar("zp_hud_green""0");
    
g_Cvar_HUD_Blue register_cvar("zp_hud_blue""0");
    
g_Cvar_HUD_Xpos register_cvar("zp_hud_xpos""0.02"); //Horizontal positioning from left to right.
    
g_Cvar_HUD_Ypos register_cvar("zp_hud_ypos""0.65"); //Vertical positioning from top to bottom.
    
    /* Open the Vault File */
    
g_iVault nvault_open("zp_simple_xp_sys");
    
    
/* Check if the Vault File is Open Fail if Not */
    
if(g_iVault == INVALID_HANDLE)
    {
        
set_fail_state("Failed to open/create vault file");
    }
}

public 
plugin_end()
{
    
/* Close the Vault file */
    
nvault_close(g_iVault);
}

/*
public plugin_natives()
{
    register_library("zp50simplexp");
    register_native("zp_get_player_level", "native_get_player_level");
    register_native("zp_set_player_level", "native_set_player_level");
    register_native("zp_get_player_hoh_level", "native_get_player_hoh_level");
    register_native("zp_set_player_hoh_level", "native_set_player_hoh_level");
}
*/

public client_authorized(id)
{
    
/* Get and Store a players Auth ID */
    
get_user_authid(idg_szAuthID[id], charsmax(g_szAuthID[]));
    
LoadData(id);
}

public 
client_disconnect(id)
{
    
ClearData(id);
    
remove_task(id+TASK_SHOWINFO);
}

public 
fwd_PlayerSpawn(id)
{
    if(
zp_core_is_zombie(id))
        
g_XP[id][Class] = CLASS_ZOMBIE;
    else
        
g_XP[id][Class] = CLASS_HUMAN;
}

public 
fwd_PlayerKilled(iVictimiAttackeriShouldGib)
{
    new 
iTempXP;
    
    
/* Self kill or Team Kill Protection */
    
if(iAttacker == iVictim || cs_get_user_team(iVictim) == cs_get_user_team(iAttacker) || g_XP[iAttacker][XP][g_XP[iAttacker][Class]] == g_szLevelDesc[LEVEL_MAX][1])
        return 
HAM_IGNORED;
    
    
iTempXP += get_pcvar_num(g_Cvar_Base_XP);
    
    if(
zp_class_nemesis_get(iVictim))
        
iTempXP += get_pcvar_num(g_Cvar_Nem_XP);
        
    if(
zp_class_survivor_get(iVictim))
        
iTempXP += get_pcvar_num(g_Cvar_Surv_XP);
        
    
/* Apply Updated XP */
    
g_XP[iAttacker][XP][g_XP[iAttacker][Class]] += iTempXP;
    
    
/* Check if more than MAX xp SET to MAX xp if so */
    
if(g_XP[iAttacker][XP][g_XP[iAttacker][Class]] > g_szLevelDesc[LEVEL_MAX][1])
        
g_XP[iAttacker][XP][g_XP[iAttacker][Class]] = g_szLevelDesc[LEVEL_MAX][1];
    
    
/* Check if player leveled up */
    
ChecklLevel(iAttacker);
    
    
/* Clear TempXP var */
    
iTempXP 0;
    
    return 
HAM_IGNORED;
}

public 
SaveData(id)
{
    
/* Save to Nvault */
    
new szVaultData[256];
    
format(szVaultDatacharsmax(szVaultData), "%d %d"g_XP[id][XP][CLASS_ZOMBIE], g_XP[id][XP][CLASS_HUMAN]);
    
nvault_set(g_iVaultg_szAuthID[id], szVaultData);
}

public 
LoadData(id)
{
    
/* Load from Nvault */
    
new szVaultData[256], szVaultDataSplit[2][256];
    
nvault_get(g_iVaultg_szAuthID[id], szVaultDatacharsmax(szVaultData));
    
    
/* Parse the vault string for the different classes */
    
parse(szVaultDataszVaultDataSplit[0], charsmax(szVaultDataSplit[]), szVaultDataSplit[1], charsmax(szVaultDataSplit[]));
    
g_XP[id][XP][CLASS_ZOMBIE] = str_to_num(szVaultDataSplit[0]);
    
g_XP[id][XP][CLASS_HUMAN] = str_to_num(szVaultDataSplit[1]);
    
    
/* Display Hud Info */
    
set_task(0.01"ShowInfo"id+TASK_SHOWINFO__"b");
}

public 
ClearData(id)
{
    
/* Clear XP Info for new player */
    
g_XP[id] = g_XP[0];
}

public 
ChecklLevel(id)
{
    new 
szPlayerName[32];
    
get_user_name(idszPlayerNamecharsmax(szPlayerName));
    
    for(new 
i=0i<sizeof(g_iLevelXP); i++)
    {
        if(
g_iLevelXP[i][0] <= g_XP[id][XP][g_XP[id][Class]] <= g_iLevelXP[i][1])
        {
            if(
g_XP[id][Level] != i)
            {
                if(
g_XP[id][Level] < i)
                {
                    
client_print(idprint_chat"%s has been promoted"szPlayerName);
                    
g_XP[id][Level] = i;
                    break;
                }
            }
        }
    }
    
SaveData(id);
}

public 
ShowInfo(id)
{
    
/* Show Hud Info for current Human/Zombie classes */
    
if(!is_user_alive(id))
        return;
    
    
set_hudmessage(get_pcvar_num(g_Cvar_HUD_Red), get_pcvar_num(g_Cvar_HUD_Green), get_pcvar_num(g_Cvar_HUD_Blue), get_pcvar_float(g_Cvar_HUD_Xpos), get_pcvar_float(g_Cvar_HUD_Ypos), 00.01.0,,_, -1);
    
ShowSyncHudMsg(idg_SyncHudObj"[Class: %s] \n [XP: %d/%d] \n [Level: %s (%d/%d)]"g_szClassDesc[g_XP[id][Class]], g_XP[id][XP][g_XP[id][Class]], (g_XP[id][Level] + 1) == LEVELS g_iLevelXP[g_XP[id][Level]][1]:g_iLevelXP[g_XP[id][Level]][0], g_szLevelDesc[g_XP[id][Level]], g_XP[id][Level], LEVELS);

Error Massage:
Code:
Error: Cannot read from file: "zp50simplexp" on line 12

Compilation aborted.
1 Error.
Could not locate output file C:\Users\abood\Desktop\zoz_ammopacks_levels.amx (compile failed).
B7PK is offline
 



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 18:36.


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