KvGetString Function

Retrieves a string value from a KeyValues key.

void KvGetString(Handle kv, const char[] key, char[] value, int maxlength, const char[] defvalue)

Parameters

Handle kv

KeyValues Handle.

const char[] key

Name of the key, or NULL_STRING.

char[] value

Buffer to store key value in.

int maxlength

Maximum length of the value buffer.

const char[] defvalue

Optional default value to use if the key is not found.

Errors

Invalid Handle.