AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Nvault compilation errors? Help please (https://forums.alliedmods.net/showthread.php?t=92243)

JProReTaRD 05-12-2009 07:55

Nvault compilation errors? Help please
 
Hi, I followed the Nvault guide: http://forums.alliedmods.net/showthread.php?t=91503 But it just won't work and I don't know why :S
I tried to search, but nothing like it came up.

I really hope someone can help me :) Thanks in advance.

This is my output :| :

Code:

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Undefined symbol "nvault_open" on line 82
Error: Undefined symbol "nvault_close" on line 88
Error: Undefined symbol "nvault_set" on line 110
Error: Undefined symbol "nvault_set" on line 115
Error: Undefined symbol "nvault_get" on line 124
Error: Undefined symbol "nvault_get" on line 127
Warning: Symbol is assigned a value that is never used: "g_Vault" on line 325

6 Errors.
Could not locate output file C:\Users\Daniel Blom\Desktop\xp-mod.amx (compile failed).

This is my Code (Well, some of it :P):
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <vault>

new PlayerClass[33];
new 
PlayerXP[33];
new 
PlayerLevel[33];

new 
g_Vault;            //Global var to hold our vault handle
new g_szAuthID[33][35];        //Global array to store auth ids of players

public plugin_cfg()
{
    
//Open our vault and have g_Vault store the handle.
    
g_Vault nvault_open"xp-mod" );
}

public 
plugin_end()
{
    
//Close the vault when the plugin ends (map change\server shutdown\restart)
    
SaveXP(id);
    
nvault_closeg_Vault );
}

public 
client_authorized(id)
{
    
//Get the connecting users authid and store it in our global string array so it
    //will not need to be retrieved every time we want to do an nvault transaction.
    
get_user_authidid g_szAuthID[id] , 34 );
}

public 
SaveXP(id)
{
    
//Save a single item into the value of the entry.
    //Example: STEAM_0:0:1234 16000

    
new szXP[7];
    new 
szLevel[7];
    new 
szKey[40];

    
formatexszKey 39 "%s-%i-XP" g_szAuthID[id], PlayerClass[id] );
    
formatexszXP "%d" PlayerXP[id] );
    
    
nvault_setg_Vault ,szKey szXP );
    
    
formatexszKey 39 "%s-%i-Level" g_szAuthID[id], PlayerClass[id] );
    
formatexszLevel "%d" PlayerLevel[id] );
    
    
nvault_setg_Vault ,szKey szXP );
}

public 
LoadXP(id)
{
    new 
szKey[40];
    
formatexszKey 39 "%s-%i-XP" g_szAuthID[id], PlayerClass[id] );
    
PlayerXP[id] = nvault_getg_Vault szKey );
    
    
formatexszKey 39 "%s-%i-Level" g_szAuthID[id], PlayerClass[id] );
    
PlayerLevel[id] = nvault_getg_Vault szKey );

    
client_printid print_chat "* Your XP: %d and Level: %i was loaded." PlayerXP[id], PlayerLevel[id] );


Regards
ReTaRD

YamiKaitou 05-12-2009 09:55

Re: Nvault compilation errors? Help please
 
PHP Code:

#include <vault>

-->

#include <nvault> 


JProReTaRD 05-12-2009 10:54

Re: Nvault compilation errors? Help please
 
Quote:

Originally Posted by YamiKaitou (Post 826173)
PHP Code:

#include <vault>

-->

#include <nvault> 



OMG :mrgreen: Haha!

Thank you very much :D (How obvious)


Regards
ReTaRD


All times are GMT -4. The time now is 01:29.

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