Raised This Month: $ Target: $400
 0% 

Nvault won't save or load


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 05-19-2012 , 11:35   Nvault won't save or load
Reply With Quote #1

This is my nvault code

PHP Code:
public SaveData(id)
{
    new 
szIP[35]
    
get_user_ip(idszIP34)

    new 
szKey[64], szData[256]

    for (new 
RaceID 1RaceID MaxRacesRaceID++)
    {
        
format(szKey63"%s-xWar"szIP)
        
format(szData255"%i#%i#%i#"PlayerLevel[id][RaceID], PlayerXP[id][RaceID], PlayerPoints[id][RaceID])
    }
    
nvault_set(NvaultszKeyszData)
}

public 
LoadData(id)
{
    new 
szIP[35]
    
get_user_ip(idszIP34)

    new 
szKey[64], szData[256]

    
parse(szDataLevel31XP31Points31)

    new 
Level[32], XP[32], Points[32]

    for (new 
RaceID 1RaceID MaxRacesRaceID++)
    {
        
format(szKey63"%s-xWar"szIP)
        
format(szData255"%i#%i#%i#"PlayerLevel[id][RaceID], PlayerXP[id][RaceID], PlayerPoints[id][RaceID])

        
PlayerLevel[id][RaceID] = str_to_num(Level)
        
PlayerXP[id][RaceID] = str_to_num(XP)
        
PlayerPoints[id][RaceID] = str_to_num(Points)
    }
    
nvault_get(NvaultszKeyszData255)

    
replace_all(szData255"#"" ")

Why it don't works? It works when I reconnect in server, but if I change map or restart server nvault won't load my xp, level....
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
 


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 00:20.


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