Raised This Month: $ Target: $400
 0% 

[SOLVED] Clearing nVault Data?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 04-29-2013 , 03:09   [SOLVED] Clearing nVault Data?
Reply With Quote #1

this is how i save and load data from nVault
Code:
public SaveXP(id){     new Vault = nvault_open("Last_Man");     new Key[64],Value[64],Name[32];     get_user_name(id,Name,sizeof Name - 1);     formatex(Key,sizeof Key - 1, "%s - LMS:", Name);     formatex(Value,sizeof Value - 1, "%d", g_iLastMan[ id ]);         nvault_set(Vault,Key,Value);     nvault_close(Vault); } public LoadXP(id){     new Vault = nvault_open("Last_Man");     new Key[64],Value[64],Name[32];     get_user_name(id,Name,sizeof Name - 1);         formatex(Key,sizeof Key - 1, "%s - LMS:", Name);     nvault_get(Vault,Key,Value,sizeof Value - 1);     nvault_close(Vault);         g_iLastMan[ id ] = str_to_num(Value); }

how would i do a command to clear ALL data to start from 0 on all players which have been saved in nVault?

EDIT:

tried using this command
Code:
nvault_prune(vault, 0, get_systime() + 1);

but it does nothing why ?
__________________

Last edited by Blizzard_87; 04-29-2013 at 09:29. Reason: SOLVED
Blizzard_87 is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 04-29-2013 , 08:55   Re: Clearing nVault Data?
Reply With Quote #2

Means your either not calling the function that prunes your vault or perhaps you didn't reopen vault after closing it. And btw do can remove the + 1 from get_systime() .
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 04-29-2013 , 09:28   Re: Clearing nVault Data?
Reply With Quote #3

SOLVED.

forgot to reset cache of vari
PHP Code:
g_iLastMan 
works now.
__________________
Blizzard_87 is offline
Reply



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 10:53.


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