Fix crash if spawnpoint.conf does not exist
parent
5844868589
commit
4de1fd23bc
2
init.lua
2
init.lua
|
@ -30,7 +30,7 @@ end
|
||||||
-- [function] Load
|
-- [function] Load
|
||||||
function spawnpoint.load()
|
function spawnpoint.load()
|
||||||
local res = io.open(path, "r"):read("*all")
|
local res = io.open(path, "r"):read("*all")
|
||||||
if res ~= "" then
|
if res and res ~= "" then
|
||||||
spawnpoint.pos = minetest.string_to_pos(res)
|
spawnpoint.pos = minetest.string_to_pos(res)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue