WoW:API GetCVarDefault: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi}} __NOTOC__
 
Returns the default value of a console variable.
GetCVarDefault allows you to get the default content of the variables defined in the config.wtf file (which is in the WTF directory).
 
  value = GetCVarDefault("cvarName")
  value = GetCVarDefault("cvarName")


== Parameters ==
== Arguments ==
=== Arguments ===
;cvarName: String ([[CVar]]) - Name of the console variable to query.
:;cvarName: String - see [[:Category:Console variables]] for a list
 
=== Returns ===
:;value: String
 
 
== Example ==
 
  DEFAULT_CHAT_FRAME:AddMessage(GetCVarDefault("screenshotFormat"))


Outputs "jpeg" in the chat frame.
== Returns ==
;value: String - Default value of the console variable.


== Notes ==
== Notes ==
 
* Calling this function with an invalid variable name will cause an error.
* Calling GetCVarDefault with an invalid variable name will cause an error
 
* See [[Config.wtf defaults]]

Revision as of 17:04, 21 June 2010

WoW API < GetCVarDefault

Returns the default value of a console variable.

value = GetCVarDefault("cvarName")

Arguments

cvarName
String (CVar) - Name of the console variable to query.

Returns

value
String - Default value of the console variable.

Notes

  • Calling this function with an invalid variable name will cause an error.