From 80ab0405ec80f048f78146c2220ae3f208af72b5 Mon Sep 17 00:00:00 2001 From: empathicqubit Date: Wed, 5 May 2021 00:16:41 -0400 Subject: [PATCH] Check text on error --- game.lua | 8 -------- runner-process.lua | 3 ++- runner.lua | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/game.lua b/game.lua index 637ff26..e1be7e1 100644 --- a/game.lua +++ b/game.lua @@ -525,14 +525,6 @@ function _M.getInputs() end end - -- XXX Will this work? Stay tuned - if _M.getClimbing() then - table.insert(inputs, 1) - else - table.insert(inputs, 0) - end - table.insert(inputDeltaDistance, 99) - return inputs, inputDeltaDistance end diff --git a/runner-process.lua b/runner-process.lua index 4805595..4bff0dd 100644 --- a/runner-process.lua +++ b/runner-process.lua @@ -91,7 +91,8 @@ local function waitLoop(inputLine) local ok, inputData = serpent.load(inputLine) if not ok or inputData == nil or speciesId == inputData[1].id then - print("Deserialization error") + io.stderr:write("Deserialization error\n") + io.stderr:write(inputLine.."\n") return end diff --git a/runner.lua b/runner.lua index e0f7f08..e122812 100644 --- a/runner.lua +++ b/runner.lua @@ -9,7 +9,7 @@ local game = nil local mathFunctions = dofile(base.."/mathFunctions.lua") local util = dofile(base.."/util.lua")() -local Inputs = config.InputSize+2 +local Inputs = config.InputSize+1 local Outputs = #config.ButtonNames local guiWidth = 0