Thread Tools Display Modes
Prev Previous Post   Next Post Next
05-26-19, 03:54 PM   #1
CrittenxD
A Deviate Faerie Dragon
Join Date: Apr 2018
Posts: 13
checking if CVar exists

Yo, I've been looking for a while and I haven't found something. I simply want to check if a cvar actually exists in case some get removed before Classic release. The following example produces an error if the cvar doesnt exist:


Code:
function setcvarifexists(cvar, value)
if GetCVarDefault(cvar) then SetCVar(cvar, value)
end
end
I'm looking for a replacement for GetCVarDefault(cvar) which just checks if the cvar exists.

EDIT: I'm also looking for a command to update all cvars similar to RestartGx(). For example the Timestamp setting will only load after reloading ui.

Last edited by CrittenxD : 05-26-19 at 06:56 PM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » checking if CVar exists


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off