From 7df1bbc190a62968d750e876d7064c3e97f91f40 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Tue, 17 Dec 2013 20:31:11 -0500 Subject: [PATCH] Variable localizations --- interact.lua | 2 +- internal.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/interact.lua b/interact.lua index b4f7164..2e54800 100644 --- a/interact.lua +++ b/interact.lua @@ -1,5 +1,5 @@ -old_is_protected = minetest.is_protected +local old_is_protected = minetest.is_protected function minetest.is_protected(pos, name) if not areas:canInteract(pos, name) then return true diff --git a/internal.lua b/internal.lua index f52b954..83ae3d5 100644 --- a/internal.lua +++ b/internal.lua @@ -5,7 +5,7 @@ end -- Save the areas table to a file function areas:save() - file, err = io.open(self.filename, "w") + local file, err = io.open(self.filename, "w") if err then return err end @@ -15,7 +15,7 @@ end -- Load the areas table from the save file function areas:load() - file, err = io.open(self.filename, "r") + local file, err = io.open(self.filename, "r") if err then self.areas = self.areas or {} return err