Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arithmetic on a nil value - happened during generation #39

Open
berengma opened this issue Feb 25, 2023 · 2 comments
Open

arithmetic on a nil value - happened during generation #39

berengma opened this issue Feb 25, 2023 · 2 comments

Comments

@berengma
Copy link

Minetest Version 5.5.0
latest mg_villages from here

Happened while pregenerating minetest world with /emergeblocks. I did that once before where it worked. This time I really wanted to have very large villages, do not know if that has something to do with the crash.

2023-02-24 18:30:26: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'mg_villages' in callback environment_OnGenerated(): /home/gundul42/.minetest/mods/mg_villages/villages.lua:213: attempt to perform arithmetic on a nil value 2023-02-24 18:30:26: ERROR[Main]: stack traceback: 2023-02-24 18:30:26: ERROR[Main]: /home/gundul42/.minetest/mods/mg_villages/villages.lua:213: in function 'generate_road' 2023-02-24 18:30:26: ERROR[Main]: /home/gundul42/.minetest/mods/mg_villages/villages.lua:491: in function 'generate_bpos' 2023-02-24 18:30:26: ERROR[Main]: /home/gundul42/.minetest/mods/mg_villages/villages.lua:670: in function 'generate_village' 2023-02-24 18:30:26: ERROR[Main]: /home/gundul42/.minetest/mods/mg_villages/mapgen.lua:798: in function 'place_villages_via_voxelmanip' 2023-02-24 18:30:26: ERROR[Main]: /home/gundul42/.minetest/mods/mg_villages/mapgen.lua:1112: in function </home/gundul42/.minetest/mods/mg_villages/mapgen.lua:1067> 2023-02-24 18:30:26: ERROR[Main]: /usr/local/share/minetest/builtin/game/register.lua:425: in function </usr/local/share/minetest/builtin/game/register.lua:409> 2023-02-24 18:30:28: ACTION[Server]: Gundul leaves game. List of players: 2023-02-24 18:30:36: ACTION[Main]: Server: Shutting down

From config.lua:
mg_villages.VILLAGE_CHECK_RADIUS = 3 mg_villages.VILLAGE_CHECK_COUNT = 2 --mg_villages.VILLAGE_CHANCE = 28 --mg_villages.VILLAGE_MIN_SIZE = 20 --mg_villages.VILLAGE_MAX_SIZE = 40 mg_villages.VILLAGE_CHANCE = 90 -- min and max size are only used in case of them beeing not provided by the village type (see buildings.lua) mg_villages.VILLAGE_MIN_SIZE = 150 mg_villages.VILLAGE_MAX_SIZE = 390 --55 mg_villages.FIRST_ROADSIZE = 5 mg_villages.BIG_ROAD_CHANCE = 15

@berengma
Copy link
Author

I think it is maybe only a division by zero in villages.lua line 213. But You maybe better check that back :)

@berengma
Copy link
Author

Same thing in line 219 where you do the modulo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant