-
Notifications
You must be signed in to change notification settings - Fork 2
SaveVar
Anatol Sevostyan edited this page Jul 19, 2021
·
3 revisions
uint32_t SaveVar(const void* pKey , uint32_t nKey , const void* pVal , uint32_t nVal , uint8_t nType);
Save the new value of the variable denoted by {nType, [pKey, nKey]}
-
pKey
: pointer to the key. Key could be any kind of data -
nKey
: the size of the key -
pVal
: pointer to the value buffer -
nVal
: the size of the value buffer -
nType
: the type of the variable (see KeyTag for possible values)
- the previous size of the value of the variable
- 0 if there was no such a variable
- if
nVal
is zero then the variable is deleted - Will
Halt()
if either variable key or value is invalid (too long). - Set
nType
toKeyTag::Internal
for normal variables, orKeyTag::InternalStealth
for 'stealth' (those are not stored in MMR), other variable types are read-only.