Crashfix: enabling arena without any sign set, made the server crash

This commit is contained in:
Marco 2020-04-15 15:26:43 +02:00
parent c3eec77771
commit a9db80a774

View File

@ -219,6 +219,11 @@ function arena_lib.enable_arena(sender, arena_ID)
arena.enabled = false
return end
if not arena.sign.x then
minetest.chat_send_player(sender, minetest.colorize("#e6482e", "[!] Cartello non impostato, arena disabilitata!"))
arena.enabled = false
return end
arena.enabled = true
arena_lib.update_sign(arena.sign, arena)
update_storage()