From 5d5709546a857c2584c23da1e6188bfae0ca7c7e Mon Sep 17 00:00:00 2001 From: JackMacWindows Date: Thu, 21 Nov 2019 21:37:25 -0500 Subject: [PATCH] Fix crash when player is nil (#8) --- ldris.lua | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/ldris.lua b/ldris.lua index d595065..1b4fdfa 100644 --- a/ldris.lua +++ b/ldris.lua @@ -1145,15 +1145,12 @@ local startGame = function(playerNumber) inputTimer = os.startTimer(game.inputDelay) -- man am I clever cVal = math.max(0, cVal - 1) - for k,v in pairs(player.control) do - --sendInfo("send_info", false) - cVal = 2 - break - end - if cVal == 1 then - --sendInfo("send_info", false) - end if player then + for k,v in pairs(player.control) do + --sendInfo("send_info", false) + cVal = 2 + break + end for k,v in pairs(player.control) do player.control[k] = v + 0.05 end