We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b0bf52e commit 040282bCopy full SHA for 040282b
worldedit/init.lua
@@ -1,15 +1,12 @@
1
local path = minetest.get_modpath(minetest.get_current_modname())
2
3
local loadmodule = function(path)
4
- local results = {pcall(function()
5
- return dofile(path)
6
- end)}
7
- if results[1] then --successfully loaded module
8
- table.remove(results, 1) --remove status indicator
9
- return unpack(results) --return all results
10
- else --load error
11
- print(results[2])
+ local file = io.open(path)
+ if not file then
+ return
12
end
+ file:close()
+ return dofile(path)
13
14
15
loadmodule(path .. "/manipulations.lua")
0 commit comments