minetest-mods / drinks

Adds a machine to juice fruits and veggies in Minetest
Other
8 stars 4 forks source link

Drinks can crash server #5

Closed Lourens-Rich closed 6 years ago

Lourens-Rich commented 6 years ago

Hi! Thank you for the mod. But unfortunately sometimes our server was crashed.

2017-12-24 19:44:58: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'drinks' in callback nodemeta_inventory_OnPut(): /home/minetest/.minetest/mods/drinks/drink_machines.lua:529: bad argument #1 to 'lower' (string expected, got nil)
2017-12-24 19:44:58: ERROR[Main]: stack traceback:
2017-12-24 19:44:58: ERROR[Main]:   [C]: in function 'lower'
2017-12-24 19:44:58: ERROR[Main]:   /home/minetest/.minetest/mods/drinks/drink_machines.lua:529: in function </home/minetest/.minetest/mods/drinks/drink_machines.lua:515>
NathanSalapat commented 6 years ago

I should have known better than release an update this close to Christmas. I'll take a look and see if I can figure out the problem.

Edit: The problem seems to be caused by putting something in the input slot of a barrel or silo that isn't a container of juice. I'll have to figure out how to only allow the juice containers to be put in the input slot.

NathanSalapat commented 6 years ago

fixed with https://github.com/minetest-mods/drinks/commit/72ef9931ed6675be94e906a15fff3e790c4c2c0f