]> git.lizzy.rs Git - Crafter.git/blobdiff - mods/itemhandling/init.lua
Fix name put in wrong place
[Crafter.git] / mods / itemhandling / init.lua
index 3c2a060228d23f2b4b407db1335e7cbc82b8dc48..eaf33d73ffd420de5f4a6f1f073e23c8f259671c 100644 (file)
@@ -186,9 +186,10 @@ local get_staticdata = function(self)
        })
 end
 
+local data
 local on_activate = function(self, staticdata, dtime_s)
        if string.sub(staticdata, 1, string.len("return")) == "return" then
-               local data = minetest.deserialize(staticdata)
+               data = minetest.deserialize(staticdata)
                if data and type(data) == "table" then
                        self.itemstring = data.itemstring
                        self.age = (data.age or 0) + dtime_s