Here simplified code with problem
Code: Select all
function OnTick(e)
for _, player in pairs(game.connected_players) do
player.disable_alert(defines.alert_type.custom);
if player.is_alert_enabled(defines.alert_type.custom) then
player.print("Custom is enabled")
else
player.print("Custom is disabled")
end
end
end
script.on_event(defines.events.on_tick, OnTick);