summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/timer/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/timer/init.lua')
-rw-r--r--plugins/timer/init.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/timer/init.lua b/plugins/timer/init.lua
index 3a96f019f0d..6600432634f 100644
--- a/plugins/timer/init.lua
+++ b/plugins/timer/init.lua
@@ -55,6 +55,12 @@ function timer.startplugin()
play_count = file:read("n")
file:close()
end
+ if not play_count then
+ play_count = 0
+ end
+ if not total_time then
+ total_time = 0
+ end
start_time = os.time()
play_count = play_count + 1
end)