From f783039892c09c71e9c3814f1da168dcda42b369 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 21 May 2016 13:01:39 +0100 Subject: [PATCH] fix nil error fix nil error --- functions.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions.lua b/functions.lua index 2562c02..ccb7cb7 100644 --- a/functions.lua +++ b/functions.lua @@ -82,7 +82,7 @@ function ipnames.save_data() ipnames.changes = false local file = io.open(ipnames.file, "w") for k, v in pairs(ipnames.data) do - if v[2] > 0 then + if v[2] and v[2] > 0 then file:write(k.."|"..v[1].."|"..v[2].."\n") else file:write(k.."|"..v[1].."\n") @@ -111,4 +111,4 @@ function ipnames.save_whitelist() end end io.close(file) -end \ No newline at end of file +end