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-12-2009 , 19:29   Re: nVault won save, Please help :)
Reply With Quote #1

Quote:
Originally Posted by JProReTaRD View Post
Hi, I followed a guide to nVault, but I can't seem to get it to save.
I checked the vault, but its empty.
I would really appreciate some help or guidance
When did you check your vault for data and what did you use to check it?

If you check the vault immediately after using a set command then you will not see the entry in your vault file. You must either do a map-change or restart the server for the data to get written to the vault file.

nVault is very simple to use; as long as your nvault file opens without error then your data should be getting written with nvault_set\nvault_pset. If you have any questions feel free to ask.

Look at the 2nd nvault_set, you need to change the szXP variable to szLevel and possibly PlayerClass[] to something else. Someone was copy and pasting
PHP Code:
    formatexszKey 39 "%s-%i-XP" g_szAuthID[id], PlayerClass[id] );
    
formatexszXP "%d" PlayerXP[id] );
    
    
nvault_setg_Vault ,szKey szXP );
    
    
formatexszKey 39 "%s-%i-Level" g_szAuthID[id], PlayerClass[id] );  //Change variables?
    
formatexszLevel "%d" PlayerLevel[id] );
    
    
nvault_setg_Vault ,szKey szXP ); //Change szXP to szLevel? 
__________________

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

Ty for a good answer, but it doesn't work.

Quote:
Originally Posted by Bugsy View Post
When did you check your vault for data and what did you use to check it?

If you check the vault immediately after using a set command then you will not see the entry in your vault file. You must either do a map-change or restart the server for the data to get written to the vault file.

nVault is very simple to use; as long as your nvault file opens without error then your data should be getting written with nvault_set\nvault_pset. If you have any questions feel free to ask.

Look at the 2nd nvault_set, you need to change the szXP variable to szLevel and possibly PlayerClass[] to something else. Someone was copy and pasting
PHP Code:
    formatexszKey 39 "%s-%i-XP" g_szAuthID[id], PlayerClass[id] );
    
formatexszXP "%d" PlayerXP[id] );
    
    
nvault_setg_Vault ,szKey szXP );
    
    
formatexszKey 39 "%s-%i-Level" g_szAuthID[id], PlayerClass[id] );  //Change variables?
    
formatexszLevel "%d" PlayerLevel[id] );
    
    
nvault_setg_Vault ,szKey szXP ); //Change szXP to szLevel? 

I checked after restart and mapchange, but there is nothing. (I use nVault-editor)

Actually, I did copy-paste from nVault tutorial bc I though, then it would work - and it's on purpose that its PlayerClass[id] both times, bc it should save xp and level for a certain class and ty for correcting my szXP

I really need some help and I would really appreciate if you could take a look at my code and correct it - or guide me like you did in this post

Regards
ReTaRD
JProReTaRD is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-13-2009 , 18:37   Re: nVault won save, Please help :)
Reply With Quote #3

No problem, Retard (chuckle)

I don't think it's an issue with nVault as it is really hard to screw up nvault code.

I would do some debugging with the other parts of your plugin that actually call the nvault_set(). Have you checked server console and\or logs to make sure the plugin isn't throwing any errors?

PHP Code:
new iVault nvault_open"test" );

if ( 
iVault == INVALID_HANDLE )
    
set_fail_state"nvault error" );

nvault_setiVault "key" "data" );

nvault_closeiVault ); 
__________________

Last edited by Bugsy; 05-13-2009 at 18:39.
Bugsy is offline
JProReTaRD
Member
Join Date: May 2009
Location: Denmark, KBH
Old 05-14-2009 , 03:06   Re: nVault won save, Please help :)
Reply With Quote #4

What did you call me? (Just kidding)

I checked the console and there are no errors (I have it on debug mode).

I have already tried to debug, but with no luck, that's why I ask for help from geniouses like you


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:36.


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