WoW:API GetCVarDefault: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (other way 'round)
mNo edit summary
Line 7: Line 7:
== Parameters ==
== Parameters ==
=== Arguments ===
=== Arguments ===
:;cvarName: String - see [[:Category:Console Variables]] for a list
:;cvarName: String - see [[:Category:Console variables]] for a list


=== Returns ===
=== Returns ===

Revision as of 20:29, 7 July 2008

WoW API < GetCVarDefault

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")

Parameters

Arguments

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.

Notes

  • Calling GetCVarDefault with an invalid variable name will cause an error