C_CVar.GetCVar

From Warcraft Wiki
Jump to navigation Jump to search

Returns the current value of a console variable.

value = C_CVar.GetCVar(name)
      = GetCVar

Arguments

name
string : CVar - name of the CVar to query the value of.

Returns

value
string? - current value of the CVar.

Details

  • Calling this function with an invalid variable name, or a variable that cannot be queried by AddOns (like "accountName"), will return nil.

Patch changes

Battle for Azeroth Patch 8.1.5 (2019-03-12): Namespaced to C_CVar.GetCVar().
WoW Icon update.png Patch 1.0.0 (2004-10-08): Added.