ElCeejo / draconis

Adds Dragons and related resources and equipment to Minetest Game
MIT License
18 stars 23 forks source link

Runtime error: attempt to perform arithmetic on field 'turn_rate' (a nil value) #39

Open lortas opened 10 months ago

lortas commented 10 months ago

I am running Minetest in version 5.9.0-dev

Server crashes after a while, when the draconis mod is enabled.

all installed mods are the most current version from github.

16:35:45: WARNING[Main]: Not registering alias, item with same name is already defined: draconis:dracolily_fire -> air
16:35:45: WARNING[Main]: Not registering alias, item with same name is already defined: draconis:dracolily_ice -> air
16:35:45: WARNING[Main]: Not registering alias, item with same name is already defined: draconis:blood_fire_dragon -> 
16:35:45: WARNING[Main]: Not registering alias, item with same name is already defined: draconis:blood_ice_dragon -> 
16:35:45: WARNING[Main]: Not registering alias, item with same name is already defined: draconis:manuscript -> 
16:37:51: WARNING[Server]: Reading initial object properties directly from an entity definition is deprecated, move it to the 'initial_properties' table instead. (Property 'physical' in entity 'draconis:ice_dragon')
16:38:03: WARNING[Server]: Reading initial object properties directly from an entity definition is deprecated, move it to the 'initial_properties' table instead. (Property 'physical' in entity 'draconis:jungle_wyvern')
16:38:03: WARNING[Server]: Deprecated call to get_bone_position, use get_bone_override instead (at /opt/minetest/bin/../mods/draconis/api/api.lua:1306)
16:38:03: WARNING[Server]: Deprecated call to set_bone_position, use set_bone_override instead (at /opt/minetest/bin/../mods/draconis/api/api.lua:1326)
16:38:03: WARNING[Server]: Deprecated call to get_bone_position, use get_bone_override instead (at /opt/minetest/bin/../mods/draconis/api/api.lua:1488)
16:38:03: WARNING[Server]: Deprecated call to set_bone_position, use set_bone_override instead (at /opt/minetest/bin/../mods/draconis/api/api.lua:1505)
16:38:03: WARNING[Server]: Deprecated call to get_bone_position, use get_bone_override instead (at /opt/minetest/bin/../mods/draconis/api/api.lua:1278)
16:38:03: WARNING[Server]: Deprecated call to set_bone_position, use set_bone_override instead (at /opt/minetest/bin/../mods/draconis/api/api.lua:1290)
16:38:08: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'draconis' in callback luaentity_Step(): /opt/minetest/bin/../mods/draconis/api/behaviors.lua:199: attempt to perform arithmetic on field 'turn_rate' (a nil value) 
16:38:08: ERROR[Main]: stack traceback: 
16:38:08: ERROR[Main]:  /opt/minetest/bin/../mods/draconis/api/behaviors.lua:199: in function 'get_method'
16:38:08: ERROR[Main]:  /opt/minetest/bin/../mods/creatura/mob_meta.lua:1043: in function 'move_to'
16:38:08: ERROR[Main]:  /opt/minetest/bin/../mods/creatura/methods.lua:395: in function 'action'
16:38:08: ERROR[Main]:  /opt/minetest/bin/../mods/creatura/mob_meta.lua:1200: in function '_execute_utilities'
16:38:08: ERROR[Main]:  /opt/minetest/bin/../mods/creatura/mob_meta.lua:938: in function </opt/minetest/bin/../mods/creatura/mob_meta.lua:903>
Skivling commented 8 months ago

I am getting the same error with Minetest 5.8.0 :

2024-03-06 21:09:55: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'draconis' in callback luaentity_Step(): /home/user/.minetest/mods/draconis/api/behaviors.lua:199: attempt to perform arithmetic on field 'turn_rate' (a nil value)
2024-03-06 21:09:55: ERROR[Main]: stack traceback:
2024-03-06 21:09:55: ERROR[Main]:   /home/user/.minetest/mods/draconis/api/behaviors.lua:199: in function 'get_method'
2024-03-06 21:09:55: ERROR[Main]:   /home/user/.minetest/mods/creatura/mob_meta.lua:1043: in function 'move_to'
2024-03-06 21:09:55: ERROR[Main]:   /home/user/.minetest/mods/creatura/methods.lua:395: in function 'action'
2024-03-06 21:09:55: ERROR[Main]:   /home/user/.minetest/mods/creatura/mob_meta.lua:1200: in function '_execute_utilities'
2024-03-06 21:09:55: ERROR[Main]:   /home/user/.minetest/mods/creatura/mob_meta.lua:938: in function </home/user/.minetest/mods/creatura/mob_meta.lua:903>
2024-03-06 21:09:55: ACTION[Main]: Server: Shutting down
BobOmbuzal commented 6 months ago

Same as #33 Fixed by #37 Just replace all "self.turn_rate" with "self.turn_rate or 6"