KvGetNum Function

Retrieves an integer value from a KeyValues key.

int KvGetNum(Handle kv, const char[] key, int defvalue)

Parameters

Handle kv

KeyValues Handle.

const char[] key

Name of the key, or NULL_STRING.

int defvalue

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

Return Value

Integer value of the key.

Errors

Invalid Handle.