Fix syntax error in Lua in environment.md

This commit is contained in:
rubenwardy 2021-06-26 23:15:26 +01:00
parent 0c6cfc1563
commit fb99ab6d6c
2 changed files with 2 additions and 2 deletions

View File

@ -202,7 +202,7 @@ local function emerge_callback(pos, action,
-- Send progress message
if context.total_blocks == context.loaded_blocks then
minetest.chat_send_all("Finished loading blocks!")
end
else
local perc = 100 * context.loaded_blocks / context.total_blocks
local msg = string.format("Loading blocks %d/%d (%.2f%%)",
context.loaded_blocks, context.total_blocks, perc)

View File

@ -184,7 +184,7 @@ local function mio_callback(pos, action,
-- Invia messaggio indicante il progresso
if param.blocchi_totali == param.blocchi_caricati then
minetest.chat_send_all("Ho finito di caricare blocchi!")
end
else
local percentuale = 100 * param.blocchi_caricati / param.blocchi_totali
local msg = string.format("Caricamento blocchi %d/%d (%.2f%%)",
param.blocchi_caricati, param.blocchi_totali, percentuale)