Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix undeclared global variable
  • Loading branch information
Rui authored and sfan5 committed Jan 5, 2016
1 parent 35b68c4 commit 7a19c53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions worldedit_gui/init.lua
Expand Up @@ -67,7 +67,7 @@ local get_formspec = function(name, identifier)
end

--implement worldedit.show_page(name, page) in different ways depending on the available APIs
if unified_inventory then --unified inventory installed
if rawget(_G, "unified_inventory") then --unified inventory installed
local old_func = worldedit.register_gui_function
worldedit.register_gui_function = function(identifier, options)
old_func(identifier, options)
Expand Down Expand Up @@ -100,7 +100,7 @@ if unified_inventory then --unified inventory installed
player:set_inventory_formspec(get_formspec(name, page))
end
end
elseif inventory_plus then --inventory++ installed
elseif rawget(_G, "inventory_plus") then --inventory++ installed
minetest.register_on_joinplayer(function(player)
local can_worldedit = minetest.check_player_privs(player:get_player_name(), {worldedit=true})
if can_worldedit then
Expand Down

0 comments on commit 7a19c53

Please sign in to comment.