GetCVar

From Eternity Wiki
Revision as of 04:17, 10 May 2026 by Printz (talk | contribs) (Created page with "{{ACSFunction|description=Get the value of an integer or string console variable. |usage= ''int'' '''GetCVar'''(''str cvar'') ''str'' '''GetCVarString'''(''str cvar'') |parameters= *''cvar'': console variable name |return=The value of the console variable, or 0 if unauthorized or inexistent. |notes=This only works with server variables, otherwise it will display an error and return 0. |id=ACC internal for '''GetCVar''', -56 for '''GetCVarString'''}}")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description

This is an ACS built-in function.

Get the value of an integer or string console variable.

Usage

int GetCVar(str cvar)

str GetCVarString(str cvar)

Parameters

  • cvar: console variable name

Return value

The value of the console variable, or 0 if unauthorized or inexistent.

Examples

No examples given.

Notes

This only works with server variables, otherwise it will display an error and return 0.

This function's identification in zspecial.acs is: ACC internal for GetCVar, -56 for GetCVarString.

See also