Undeclared oldname to local

Removes error reported by minetest regarding undefined global.
This commit is contained in:
cmdskp 2015-12-13 20:01:33 +00:00
parent 173569fd12
commit 5644b08229

View File

@ -216,7 +216,7 @@ function stained_glass_define(arg)
local aliasname local aliasname
minetest.register_alias( "stained_glass:" .. code, "stained_glass:" .. name) minetest.register_alias( "stained_glass:" .. code, "stained_glass:" .. name)
if string.match(name,"redviolet") then if string.match(name,"redviolet") then
oldname=name local oldname=name
aliasname=string.gsub(name, "redviolet","red_violet") -- need to support red_violet existence, too. aliasname=string.gsub(name, "redviolet","red_violet") -- need to support red_violet existence, too.
minetest.register_alias( "stained_glass:" .. aliasname, "stained_glass:" .. oldname) minetest.register_alias( "stained_glass:" .. aliasname, "stained_glass:" .. oldname)
end end