AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED] Clearing nVault Data? (https://forums.alliedmods.net/showthread.php?t=214586)

Blizzard_87 04-29-2013 03:09

[SOLVED] Clearing nVault Data?
 
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 ?

hornet 04-29-2013 08:55

Re: Clearing nVault Data?
 
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() .

Blizzard_87 04-29-2013 09:28

Re: Clearing nVault Data?
 
SOLVED.

forgot to reset cache of vari
PHP Code:

g_iLastMan 

works now.


All times are GMT -4. The time now is 10:53.

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