Raised This Month: $51 Target: $400
 12% 

nvault saving and loading string


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
bartek93tbg
Member
Join Date: Apr 2011
Location: Poland
Old 05-22-2011 , 16:14   nvault saving and loading string
Reply With Quote #1

Hi. I have problem, how add to this 3rd variable (string)?

Code:
[...]
new topexp;
new topexpname[35];
//new topexplvl[35]; //I want add this
[...]

public top_stats_save()
{
    new vaultkey[64],vaultdata[256];

        format(vaultkey,63,"zp_topexp");
        format(vaultdata,255,"%i#%s#",topexp,topexpname);

        nvault_set(zp_top,vaultkey,vaultdata);
}

public top_stats_load()
{
    new vaultkey[64],vaultdata[256];

        format(vaultkey,63,"zp_topexp");
        format(vaultdata,255,"%i#%s#",topexp,topexpname) ;

        nvault_get(zp_top,vaultkey,vaultdata,255);
    replace_all(vaultdata, 255, "#", " ");

    new jeden[100];
    new str_rank[32];
    parse(vaultdata, str_rank, charsmax(str_rank), topexpname, charsmax(topexpname));
    

     parse(vaultdata, jeden, 99);
    topexp = str_to_num(jeden);
}
I have tried (2 hours or more) but it doesn't work because I dont' know how to load int, string and string from nvault.
Can you modify this for me? I need this.

THANKS
bartek93tbg 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 15:50.


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