add global _G

CVar ScriptError -> ShowErrors
This commit is contained in:
Pinya
2017-12-14 20:21:52 +03:00
parent 33838dfdbd
commit 0c82c9a90f
+3 -1
View File
@@ -1,3 +1,5 @@
_G = getfenv()
--Cache global variables
local strmatch = strmatch
--WoW API
@@ -14,7 +16,7 @@ function _ERRORMESSAGE_NEW(message)
LoadAddOn("!DebugTools")
local loaded = IsAddOnLoaded("!DebugTools")
if (GetCVar("scriptErrors") == "1") then
if (GetCVar("ShowErrors") == "1") then
if (not loaded or DEBUG_DEBUGTOOLS) then
ScriptErrors_Message:SetText(message)
ScriptErrors:Show()