Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Advertisement

Sets a console variable.

success = C_CVar.SetCVar(name [, value])
        = SetCVar

Arguments[]

name
string : CVar - Name of the CVar.
value
string|number? = "0" - The new value of the CVar.

Returns[]

success
boolean - Whether the CVar was successfully set. Returns nil if attempting to set a secure cvar in combat.

Details[]

  • Some settings require a reload/relog before they take effect.
  • CVars are not saved to Config.wtf until properly logging out or reloading the game.
  • Secure CVars cannot be set in combat and only with SetCVar instead of /console.
  • Character and Account specific variables are stored server-side depending on CVar synchronizeConfig.

Patch changes[]

Dragonflight Patch 10.0.0 (2022-10-25): Removed scriptCVar argument.
Battle for Azeroth Patch 8.1.5 (2019-03-12): Namespaced to C_CVar.SetCVar.
WoW Icon update Patch 1.0.0 (2004-10-08): Added.

Advertisement