Raised This Month: $ Target: $400
 0% 

[HELP] nVault problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
KaLoIaN
Senior Member
Join Date: Feb 2013
Old 05-09-2016 , 10:31   [HELP] nVault problem
Reply With Quote #1

I decided to go to MySQL because nVault is very problematic on my server..
Sometimes when the server crashes everyone on the server loses his variables stored in the vault, but another plugin which also uses nVault does not loses it's variables?

PHP Code:
public SaveData(id)
{
    new 
AuthID[35]
    
get_user_name(idAuthID34)
 
    new 
vaultkey[64], vaultdata[256]
    
format(vaultkey63"%s"AuthID)
    
format(vaultdata255"%i#%i#%i#%i#"g_Health[id], g_Armor[id], g_Damage[id], g_Money[id])
    
nvault_set(g_Nvaultvaultkeyvaultdata)
    return 
PLUGIN_CONTINUE
}

public 
LoadData(id)
{
    new 
AuthID[35]
    
get_user_name(idAuthID34)
 
    new 
vaultkey[64], vaultdata[256]
    
format(vaultkey63"%s"AuthID)
    
format(vaultdata255"%i#%i#%i#%i#"g_Health[id], g_Armor[id], g_Damage[id], g_Money[id])
    
nvault_get(g_Nvaultvaultkeyvaultdata,255)
 
    
replace_all(vaultdata255"#"" ")
 
    new 
PlayerHP[32], PlayerAP[32], PlayerDM[32], PlayerMY[32]
 
    
parse(vaultdataPlayerHP31PlayerAP31PlayerDM31PlayerMY31)
 
    
g_Health[id] = str_to_num(PlayerHP)
    
g_Armor[id] = str_to_num(PlayerAP)
    
g_Damage[id] = str_to_num(PlayerDM)
    
g_Money[id] = str_to_num(PlayerMY)
 
    return 
PLUGIN_CONTINUE

This code of nVault loses the stored variables on server crash. I don't found the code which does not loses the stored variables because it does not have .SMA file.
KaLoIaN 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:42.


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