Fixes zero division errors

This commit is contained in:
deathride58
2019-02-23 18:12:23 -05:00
parent fbab8b5459
commit 08b8b8f30b
+3 -1
View File
@@ -192,7 +192,9 @@
//Set news report and mode result
mode.set_round_result()
send2irc("Server", "A round of [mode.name] just ended[mode_result == "undefined" ? "." : "with a [mode_result]."] Survival rate: [PERCENT(popcount[POPCOUNT_SURVIVORS]/GLOB.joined_player_list.len)]%")
var/survival_rate = GLOB.joined_player_list.len ? "PERCENT(popcount[POPCOUNT_SURVIVORS]/GLOB.joined_player_list.len)%" : "there's literally no players"
send2irc("Server", "A round of [mode.name] just ended[mode_result == "undefined" ? "." : " with a [mode_result]."] Survival rate: [survival_rate]")
if(length(CONFIG_GET(keyed_list/cross_server)))
send_news_report()