Исправляет удаление лишнего окна GUI Unifier (#76)

This commit is contained in:
Aleksei-bird 2024-06-25 22:03:42 +03:00
parent c84ab187b6
commit d63441e5fd

View File

@ -126,9 +126,9 @@ script.on_event(defines.events.on_built_entity, function(event)
myVariable = myVariable + 1 myVariable = myVariable + 1
if myVariable <= 5 then if myVariable <= 5 then
for _, player in pairs(game.players) do for _, player in pairs(game.players) do
if player.gui.top.mod_gui_top_frame.children[1].random then if player.gui.top.mod_gui_top_frame and player.gui.top.mod_gui_top_frame.children[1] and player.gui.top.mod_gui_top_frame.children[1].random then
player.gui.top.mod_gui_top_frame.children[1].random.destroy() player.gui.top.mod_gui_top_frame.children[1].random.destroy()
end end
end end
end end
end) end)