maikerumine wrote:Drgnrdr wrote:Love your mod, but last night ran into this error(game crash):
- Code: Select all
2018-01-25 04:37:54: ACTION[Server]: singleplayer uses nyancats_plus:rainbow_hoe, pointing at [node under=-4,16,6 above=-4,17,6]
2018-01-25 04:37:54: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback item_OnUse(): C:\GAMES\MINETEST\bin\..\mods\toolranks\init.lua:13: bad argument #1 to 'find' (string expected, got nil)
2018-01-25 04:37:54: ERROR[Main]: stack traceback:
2018-01-25 04:37:54: ERROR[Main]: [C]: in function 'find'
2018-01-25 04:37:54: ERROR[Main]: C:\GAMES\MINETEST\bin\..\mods\toolranks\init.lua:13: in function 'get_tool_type'
2018-01-25 04:37:54: ERROR[Main]: C:\GAMES\MINETEST\bin\..\mods\toolranks\init.lua:28: in function 'create_description'
2018-01-25 04:37:54: ERROR[Main]: C:\GAMES\MINETEST\bin\..\mods\toolranks\init.lua:100: in function 'new_afteruse'
2018-01-25 04:37:54: ERROR[Main]: C:\GAMES\MINETEST\bin\..\mods\farming/hoes.lua:116: in function <C:\GAMES\MINETEST\bin\..\mods\farming/hoes.lua:64>
2018-01-25 04:37:54: ERROR[Main]: (tail call): ?
This happened when using any hoe other than default hoes. The error stopped only when mod was disabled or removed.
You wull need to add support for it manually, like I did here:
- Code: Select all
if minetest.get_modpath("toolranks") then
--aikerum
minetest.override_item("es:pick_aikerum", {
original_description = "Extreme Survival Aikerum Pickaxe",
description = toolranks.create_description("Extreme Survival Aikerum Pickaxe", 0, 1),
after_use = toolranks.new_afteruse})
minetest.override_item("es:axe_aikerum", {
original_description = "Extreme Survival Aikerum Axe",
description = toolranks.create_description("Extreme Survival Aikerum Axe", 0, 1),
after_use = toolranks.new_afteruse})
minetest.override_item("es:shovel_aikerum", {
original_description = "Extreme Survival Aikerum Shovel",
description = toolranks.create_description("Extreme Survival Aikerum Shovel", 0, 1),
after_use = toolranks.new_afteruse})
end
Add code like this in a new mod and do it for all the tools you want to add.
So you means for the more ores tools ( viewtopic.php?id=549 ) a new mod would has to be created just to prevent them from cashing the server?