From 2c63903e8ef1429f57d1fc9f7dc239581f5c1733 Mon Sep 17 00:00:00 2001 From: the-real-herowl Date: Sat, 28 Oct 2023 03:22:28 +0200 Subject: [PATCH] Fixed variable definitions ("undeclared global") --- mods/ITEMS/mcl_potions/functions.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/mcl_potions/functions.lua b/mods/ITEMS/mcl_potions/functions.lua index 8aa01c569..275ec3405 100644 --- a/mods/ITEMS/mcl_potions/functions.lua +++ b/mods/ITEMS/mcl_potions/functions.lua @@ -490,7 +490,7 @@ function mcl_potions._clear_cached_player_data(player) effect[player] = nil end - meta = player:get_meta() + local meta = player:get_meta() meta:set_int("night_vision", 0) end @@ -514,7 +514,7 @@ function mcl_potions._save_player_effects(player) if not player:is_player() then return end - meta = player:get_meta() + local meta = player:get_meta() for name, effect in pairs(registered_effects) do meta:set_string("mcl_potions:_EF_"..name, minetest.serialize(EF[name][player])) @@ -525,7 +525,7 @@ function mcl_potions._load_player_effects(player) if not player:is_player() then return end - meta = player:get_meta() + local meta = player:get_meta() -- handle legacy meta strings local legacy_invisible = minetest.deserialize(meta:get_string("_is_invisible"))