Returns the value of a configuration variable. Causes an error if the named CVar does not exist.

Note that all values are returned as strings: use of tonumber() may be required if using a value in a numeric context. (See also GetCVarBool() for binary values.)


See also CVar functions.

Signature:

string = GetCVar("cvar")

Arguments:

  • cvar - Name of a CVar (string)

Returns:

  • string - Value of the CVar (any)