From 4641b26ea374b8d2a954894550680a57e5f2b5eb Mon Sep 17 00:00:00 2001 From: "p.kosyh" Date: Wed, 1 Sep 2010 10:34:14 +0000 Subject: [PATCH] variables fix --- stead/stead.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/stead/stead.lua b/stead/stead.lua index 1e26cae..c5f46e4 100644 --- a/stead/stead.lua +++ b/stead/stead.lua @@ -1701,7 +1701,13 @@ function gamefile(file, forget) set_music(); set_sound(); timer:stop(); - variables = nil + if type(variables) == 'table' then + local k,v + for k,v in ipairs(variables) do + _G[v] = nil + end + variables = nil + end init = function() -- null init function end for_each_object(function(k, o) -- destroy all objects