Raised This Month: $ Target: $400
 0% 

nvault_get - Clear Explanation to question please


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SubStream
Veteran Member
Join Date: Aug 2005
Location: USA
Old 06-19-2006 , 15:11   nvault_get - Clear Explanation to question please
Reply With Quote #1

Quote:
Originally Posted by AMX Mod X Documentation
nvault_get ( vault, const key[], ... )

nvault_get - Gets a vault value by returning an int setting a byref float or setting a string & maxlength.
so assuming I've already opened the vault in plugin_init, I assume that I could do
Code:
i_myinteger = nvault_get ( myvault, s_keyname ) if ( i_myinteger == 0 )            // blah blah my code here

Is that correct usage of nvault_get and would I then need to do
Code:
nvault_pset ( myvault, s_keyname, 0 )
to change the value to 0 and
Code:
nvault_pset ( myvault, s_keyname, 1 )
in order to turn the value BACK to 1 in other parts of the code? Is this correct?
SubStream is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-19-2006 , 15:43  
Reply With Quote #2

I don't understand why people ask questions like this.

Why don't you try it and see for yourself?

But as far as this goes, I think your usage is correct assuming s_keyname is a valid key name.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
BAILOPAN
Join Date: Jan 2004
Old 06-20-2006 , 17:50  
Reply With Quote #3

nvault_set() requires a string for the value, not an integer.
__________________
egg
BAILOPAN is offline
Reply


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 07:59.


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