Thread: nVault Tutorial
View Single Post
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-16-2012 , 12:28   Re: nVault
Reply With Quote #33

Quote:
Originally Posted by Infernuz View Post
What's the point of nvault_touch if it only updates timestamp? I would as well want it to update my data.
Use nvault_set() to update your data and the timestamp will update, too.

Quote:
Originally Posted by Infernuz View Post
Do I have to first make a check if data exists and only then use nvault_set? (Finds first and replaces the data after)
Or does nvault_set do it automatically without creating a new record?

Nothing is mentioned if nvault_set updates or not.
Well the whole point of "keys" are that they are unique in the vault.
If it were to create new entries instead of updating, those keys would not be unique.
So the answer is: yes, nvault_set() updates the data if it already exists.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline