Revision as of 13:34, March 29, 2010 by Resa1983 (Talk | contribs)

(diff) ←Older revision | Latest revision (diff) | Newer revision → (diff)
102,949pages on
this wiki
WoW API < SetCVar

Changes a variable located inside

 SetCVar( "cvar", value[, "scriptCVar"] );

Parameters Edit

Arguments Edit

String - CVar to modify
New value of the CVar - This value is stored in as plain text. Passing anything other than a string or number is just silly.
String - First argument for the CVAR_UPDATE event, if none is passed then the event isn't fired

Details Edit

Settings that are changed using this will be applied to the game UI immediately, however settings are not saved until exit and settings which were previously not defined in are not available to GetCVar until the file has been saved at logout.

Some options require a call to RestartGx() before they take effect.

If you try and pass an invalid CVar you'll get an error, check Console variables for a list of valid CVars.

By default CVAR_UPDATE is not fired when you call SetCVar, to make sure it does you need to pass the third argument scriptCVar which will be the first argument in the event when it's fired.

Around Wikia's network

Random Wiki