View Single Post
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