Raised This Month: $ Target: $400
 0% 

NVault invalid id


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
noob cannon lol
SourceMod Donor
Join Date: Sep 2005
Old 05-15-2006 , 23:00   NVault invalid id
Reply With Quote #1

I get this error when i use stock functions i created for a plugin im making. I'm using the frequentfraggerprogram's time tracking as a framework for doing this.:

Code:
L 05/14/2006 - 08:42:28: [nVault] Invalid vault id: 0

L 05/14/2006 - 08:42:28: [AMXX] Displaying debug trace (plugin "zp_ffp2.amxx")
L 05/14/2006 - 08:42:28: [AMXX] Run time error 10: native error (native "nvault_set")
L 05/14/2006 - 08:42:28: [AMXX]    [0] zp_ffp2.sma::add_points (line 662)
L 05/14/2006 - 08:42:28: [AMXX]    [1] zp_ffp2.sma::PressedAbilities (line 703)
L 05/14/2006 - 08:42:28: [AMXX]    [2] zp_ffp2.sma::PressedAbilities (line 702)
L 05/14/2006 - 08:42:36: [nVault] Invalid vault id: 0
This is a stock function to add points- it fails when i try to input strings and strings through constants. Some of this code is sloppy as hell, but I won't care for now.:
Code:
stock add_points(id, vault[32], points) {     new authid[32]     get_user_authid(id,authid,31)     client_print(0, print_chat, "%s", authid)//debugging     client_print(0, print_chat, "%s", vault)//debugging     client_print(0, print_chat, "step1")//debugging     new VaultHandle = nvault_open(vault)     client_print(0, print_chat, "step2")//debugging         // Check if the vault opens properly?     if( VaultHandle == INVALID_HANDLE ){         log_amx("Error opening nVault file: %s", VAULTNAME3)     }                 new before = check_vault(id, vault)     new final = before + points     client_print(0, print_chat, "%f", float(final))//debugging     client_print(0, print_chat, "step3")    //debugging         new vault_info[5]     num_to_str(final,vault_info,4)     client_print(0, print_chat, "%s", vault_info)//debugging     client_print(0, print_chat, "step4") //debugging     nvault_set(VaultHandle, authid, vault_info)     client_print(0, print_chat, "step5") //debugging         nvault_close(VaultHandle) }

This is code within a menu callback that executes add_points
Code:
                new gravity[32]                 format(gravity, 31, "gravity")                 add_points(id, gravity, 1)

This is the stock function check_vault- i know that this is working fine and returns the correct number.
Code:
stock check_vault(id, vault[32]) {     new authid[32]     get_user_authid(id,authid,31)     g_VaultHandle = nvault_open(vault)         // Check if the vault opens properly?     if( g_VaultHandle == INVALID_HANDLE )     {         log_amx("Error opening nVault file: %s", VAULTNAME);     }                 new vault_info[21], TimeStamp                 nvault_lookup(g_VaultHandle, authid, vault_info, 20, TimeStamp)     new info = str_to_num(vault_info)     nvault_close(g_VaultHandle)         return info }

There are three compiler warnings
Code:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// zp_ffp2.sma
// C:\Program Files\Steam\SteamApps\mrdeathllama\half-life\zp\addons\amxmodx\scripting\zp_ffp2.sma(478) : warning 213: tag mismatch
// C:\Program Files\Steam\SteamApps\mrdeathllama\half-life\zp\addons\amxmodx\scripting\zp_ffp2.sma(480) : warning 213: tag mismatch
// C:\Program Files\Steam\SteamApps\mrdeathllama\half-life\zp\addons\amxmodx\scripting\zp_ffp2.sma(779) : warning 204: symbol is assigned a value that is never used: "gCurrentTime"
// Header size:           1560 bytes
// Code size:            18884 bytes
// Data size:            10860 bytes
// Stack/heap size:      16384 bytes; max. usage is unknown, due to recursion
// Total requirements:   47688 bytes
// 
// 3 Warnings.
// Done.
//
// Compilation Time: 1.89 sec
// ----------------------------------------

// File not found.

Press enter to exit ...
noob cannon lol is offline
Send a message via AIM to noob cannon lol Send a message via MSN to noob cannon lol
 


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 16:30.


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