mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Few Edits to fix bugs
This commit is contained in:
@@ -49,6 +49,21 @@ function Gui.bar(frame,width)
|
||||
return line
|
||||
end
|
||||
|
||||
--- Used to set the index of a drop down to a certian item
|
||||
-- @usage Gui.set_dropdown_index(dropdown,player.name)
|
||||
-- @param dropdown the dropdown that is to be effected
|
||||
-- @param _item this is the item to look for
|
||||
-- @return returns the dropdown if it was successful
|
||||
function Gui.set_dropdown_index(dropdown,_item)
|
||||
if dropdown and dropdown.valid and dropdown.items and _item then else return end
|
||||
local _index = 1
|
||||
for index, item in pairs(dropdown.items) do
|
||||
if item == _item then _index = index break end
|
||||
end
|
||||
dropdown.selected_index = _index
|
||||
return dropdown
|
||||
end
|
||||
|
||||
local function _thread()
|
||||
local thread = Server.get_thread('camera-follow')
|
||||
if not thread then
|
||||
|
||||
@@ -63,7 +63,7 @@ function ExpLib.player_return(rtn,colour,player)
|
||||
end
|
||||
|
||||
--- Logs an embed to the json.data we use a js script to add things we cant here
|
||||
-- @usage json_emit{title='BAN',color_name='info',description='A player was banned' ... }
|
||||
-- @usage json_emit{title='BAN',color='0x0',description='A player was banned' ... }
|
||||
-- @tparam table arg a table which contains everything that the embeded will use
|
||||
-- @param[opt=''] title the tile of the embed
|
||||
-- @param[opt='0x0'] color the color given in hex you can use Color.to_hex{r=0,g=0,b=0}
|
||||
|
||||
@@ -13,7 +13,7 @@ _error = error
|
||||
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}
|
||||
discord_emit{title='SCRIPT ERROR',color=color,description='There was an error in the script @Developers ',Error=err}
|
||||
elseif _G.Game and game then
|
||||
if Game.print_all(err) == 0 then
|
||||
_error(err)
|
||||
|
||||
Reference in New Issue
Block a user