Wowpedia
Advertisement
Game Flavors
Links
Patch
Added in 8.1.5 / 2.5.1

Returns the current value of a console variable.

value = C_CVar.GetCVar("name")

Arguments

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

Returns

value 
string?Optional. Could be nil. - 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

Retail

  • Battle for Azeroth Patch 8.1.5 / API (2019-03-12): Moved to C_CVar. The previous alias GetCVar() is still available as a script wrapper. [1]

Classic

  • WoW Icon update.png Patch 1.13.2 / API (2019-08-26): Developed from 8.0.1 code base; therefore remains GetCVar() despite subsequent change in 8.1.5.
Advertisement