Raised This Month: $ Target: $400
 0% 

nVault won save, Please help :)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-14-2009 , 10:10   Re: nVault won save, Please help :)
Reply With Quote #1

I just did a test using your code and it is saving. You should consider saving all of a players data in 1 vault entry instead of multiple.

PlayerClass[id] will always be 0 when a player first connects so any value you intended on being there for loading is not. If you need to store player class then you may need another vault entry [using the current way] or if you change to use 1 vault entry just include PlayerClass[] in the saved data.
Code:
public LoadXP(id) {     new szKey[40];     formatex( szKey , 39 , "%s-%i-XP" , g_szAuthID[id], PlayerClass[id] );     PlayerXP[id] = nvault_get( g_Vault , szKey );         formatex( szKey , 39 , "%s-%i-Level" , g_szAuthID[id], PlayerClass[id] );     PlayerLevel[id] = nvault_get( g_Vault , szKey );     client_print( id , print_chat , "* Your XP: %d and Level: %i was loaded." , PlayerXP[id], PlayerLevel[id] ); }

As you can see, data is being saved using your code:
__________________

Last edited by Bugsy; 05-14-2009 at 10:12.
Bugsy is offline
JProReTaRD
Member
Join Date: May 2009
Location: Denmark, KBH
Old 05-14-2009 , 11:19   Re: nVault won save, Please help :)
Reply With Quote #2

Thank you for your help, but I am really noob to this Pawn thing

I need to save xp and lvl to playerclasses of steamID. (Like Warcraft mod)
Ie.

Steam:0:042423525-CLASS_BHOPPER-XP 302
Steam:0:042423525-CLASS_BHOPPER-Level 3

Steam:0:042423525-CLASS_BHOPPER-XP 120
Steam:0:042423525-CLASS_BHOPPER-Level 1


And That is what I don't know how to do
And is "*.vault" located in "data/" or "data/vault/" ?

I am very sorry for all those noob requests and questions


Regards
ReTaRD
JProReTaRD 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 01:35.


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