From af050c6d65435dd0ab834e6b5100241ab0f2d492 Mon Sep 17 00:00:00 2001 From: Oarcinae Date: Mon, 24 Aug 2020 21:32:54 -0400 Subject: [PATCH] Possible bug fix for reported error but not 100% sure... --- lib/separate_spawns_guis.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/separate_spawns_guis.lua b/lib/separate_spawns_guis.lua index ff47536..0206907 100644 --- a/lib/separate_spawns_guis.lua +++ b/lib/separate_spawns_guis.lua @@ -595,6 +595,11 @@ function CreateSpawnCtrlGuiTab(tab_container, player) end end + -- @todo Figure out why this case could be hit... Fix for error report in github. + if (global.ocore.playerCooldowns[player.name] == nil) then + global.ocore.playerCooldowns[player.name] = {setRespawn=game.tick} + end + -- Sets the player's custom spawn point to their current location if ((game.tick - global.ocore.playerCooldowns[player.name].setRespawn) > (global.ocfg.respawn_cooldown_min * TICKS_PER_MINUTE)) then