nvault.
So, i've been reading bugsy's tutorial on how to save and load data using nVault. I understand how to save and load a single array, but i have more than 1 array to save & load. The thing is i want to use formatex and use nvault_set just once to save the data. I'm not even sure if i can use nvault_set multiple times to save multiple arrays.
my current code (Code which doesn't work when i change map) PHP Code:
|
Re: nvault.
A key is unique in a vault, so you cannot save multiple items under the same key..the last nvault_set() will overwrite all the previous ones. This is the whole idea behind nvault array, allowing you to save multiple pieces of data under a single key.
Looking at your code it seems as if your mindset is that the variable name has a bearing on the type of data you are saving and retrieving, and this is not the case. The only thing the nvault module sees is: nvault_get( vault id , string variable , string variable , length ) nvault_set( vault id , string variable , string variable ) |
Re: nvault.
Quote:
|
Re: nvault.
Quote:
Code:
|
Re: nvault.
Also, I don't think there's a need to use "#" as a replacement for a whitespace. Just do "%i %i %i" directly. They're all integers, so there shouldn't be any problems.
PS: the max AuthId length is 64, not 35. You probably don't need 33 for a buffer that holds a single integer, the integer itself can't even be that big. |
Re: nvault.
This doesn't work either
PHP Code:
|
Re: nvault.
Code:
|
Re: nvault.
Quote:
https://forums.alliedmods.net/showpo...78&postcount=4 |
Re: nvault.
There are many things in his code that need fixing/optimizing, starting from the natives that won't even work.
|
Re: nvault.
Quote:
|
| All times are GMT -4. The time now is 02:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.