#198 Fix a crash, step 28

This commit is contained in:
kay27 2022-02-24 06:00:47 +04:00
parent 989d46cc5b
commit 4ab521ddc8
1 changed files with 1 additions and 1 deletions

View File

@ -560,7 +560,7 @@ function mcl_enchanting.handle_formspec_fields(player, formname, fields)
return
end
local player_level = mcl_experience.get_level(player)
if player_level < slot.level_requirement then
if not player_level or (player_level < slot.level_requirement) then
return
end
mcl_experience.set_level(player, player_level - button_pressed)