1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-12 13:30:35 +01:00

fixed crash when player leave during the join server

This commit is contained in:
crabman77 2015-06-28 16:30:05 +02:00
parent fe2bf3e822
commit d77c9ab5ff

View File

@ -35,6 +35,9 @@ local function add_buttons(player, formspec)
formspec = player:get_inventory_formspec() formspec = player:get_inventory_formspec()
end end
local w,h = get_formspec_size(formspec) local w,h = get_formspec_size(formspec)
if not w or not h then
return
end
for i=1,#tweak.buttons do for i=1,#tweak.buttons do
formspec = formspec .. "button["..w-(0.8+(i*0.8))..",0.2;" .. tweak.buttons[i] formspec = formspec .. "button["..w-(0.8+(i*0.8))..",0.2;" .. tweak.buttons[i]
end end