Closed BrunoMine closed 6 years ago
The way I fixed this in my (yet uncommitted) code was:
if use_access_node == true and node_pos then
In this line
I think it works well. Let me know if you notice anything weird. I'm not entirely sure of the root cause of the issue and I still need to investigate, but above is an ok workaround.
I updated my brach and made the change you suggested. Results
2018-06-20 13:58:08: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'sunos' in callback luaentity_Step(): ...npc/executable/instructions/builtin_instructions.lua:410: bad argument #1 to 'setyaw' (number expected, got table)
2018-06-20 13:58:08: ERROR[Main]: stack traceback:
2018-06-20 13:58:08: ERROR[Main]: [C]: in function 'setyaw'
2018-06-20 13:58:08: ERROR[Main]: ...npc/executable/instructions/builtin_instructions.lua:410: in function <...npc/executable/instructions/builtin_instructions.lua:399>
2018-06-20 13:58:08: ERROR[Main]: (tail call): ?
2018-06-20 13:58:08: ERROR[Main]: ...npc/executable/instructions/builtin_instructions.lua:524: in function <...npc/executable/instructions/builtin_instructions.lua:510>
2018-06-20 13:58:08: ERROR[Main]: (tail call): ?
2018-06-20 13:58:08: ERROR[Main]: ...Mods/minetest 0-5-0/bin/../mods/advanced_npc/npc.lua:1376: in function 'execute'
2018-06-20 13:58:08: ERROR[Main]: ...Mods/minetest 0-5-0/bin/../mods/advanced_npc/npc.lua:1408: in function 'execute'
2018-06-20 13:58:08: ERROR[Main]: ...Mods/minetest 0-5-0/bin/../mods/advanced_npc/npc.lua:1461: in function 'execution_routine'
2018-06-20 13:58:08: ERROR[Main]: ...Mods/minetest 0-5-0/bin/../mods/advanced_npc/npc.lua:2189: in function <...Mods/minetest 0-5-0/bin/../mods/advanced_npc/npc.lua:2121>
2018-06-20 13:58:08: ERROR[Main]: (tail call): ?
2018-06-20 13:58:08: ERROR[Main]: ...de Mods/minetest 0-5-0/bin/../mods/mobs_redo/api.lua:2579: in function <...de Mods/minetest 0-5-0/bin/../mods/mobs_redo/api.lua:2522>
2018-06-20 13:58:08: ACTION[Server]: 888 leaves game. List of players:
Loaded texture: [...]/textures/base/pack/menu_header.png
Loaded texture: [...]/games/minetest_game/menu/header.png
@BrunoMine I updated the dev
branch of your mod and tested on my local. Found no issues (except for one NPC not doing anything).
I have pushed all my code in to the clean_api
branch. Can you test with this latest push?
Problem fixed!
This variable node_pos appears to return null when end_pos argument is a table. I immediately tried that include line
The error has stopped, but the NPC always looks in a steady direction (in this case, to the back.) after walking to a position, I do not know if this is normal.