use local function safe_run
This commit is contained in:
parent
8ffee54ecd
commit
0ce05330ec
2
init.lua
2
init.lua
@ -12,7 +12,7 @@ local modlist = core.get_modnames() or {"Failed to load modlist"}
|
||||
local worldpath = core.get_worldpath()
|
||||
local F = core.formspec_escape
|
||||
|
||||
function safe_run(code)
|
||||
local function safe_run(code)
|
||||
local func, err = loadstring(code)
|
||||
if not func then -- Syntax error
|
||||
return err
|
||||
|
Loading…
x
Reference in New Issue
Block a user