Rank system working

This commit is contained in:
Cooldude2606
2017-12-10 19:17:16 +00:00
parent 8f5bc8a424
commit 6b409f7cbe
9 changed files with 320 additions and 43 deletions

View File

@@ -14,7 +14,7 @@ error = function(err)
if _G.discord_emit and game then
local color = _G.Color and Color.to_hex(defines.text_color.bg) or '0x0'
discord_emit{title='SCRIPT ERROR',color=color,description=err}
elseif _G.Game then
elseif _G.Game and game then
if Game.print_all(err) == 0 then
_error(err)
end
@@ -32,4 +32,8 @@ ExpLib._unpack_to_G(ExpLib)
_G.discord_emit = nil -- un-comment this line if you are not using the json.data
-- loads the ExpCore files these are need in order to run the other addons
Ranking, Server, Gui = require('/locale/ExpCore/load'){'Ranking','Server','Gui'}
Ranking, Server, Gui = require('/locale/ExpCore/load'){'Ranking','Server','Gui'}
-- this loads the ranks that Ranking uses
require('/locale/ExpCore/ranks')
-- this loads any edits that are not need in core pcall as file may not be preset
pcall(require,'/locale/Addons/playerRanks')