lnjX / Minetest_TNG

The NeXt Game for the MGE [minetest_tng]
https://gamerbude.github.io/tng
GNU General Public License v3.0
10 stars 5 forks source link

[Bug] Ruins #22

Closed lnjX closed 8 years ago

lnjX commented 8 years ago

Thats just a warning...

2016-05-08 12:11:48: WARNING[Server]: Assignment to undeclared global "new" inside a function at ...est/games/minetest_tng/mods/default/lua/mapgen/ruins.lua:137.

And that lets the game :bomb: CRASH :boom:

2016-05-08 12:14:10: ERROR[Main]: ServerError: Runtime error from mod 'default' in callback environment_Step(): ...est/games/minetest_tng/mods/default/lua/mapgen/ruins.lua:34: attempt to index local 'n' (a nil value)
2016-05-08 12:14:10: ERROR[Main]: stack traceback:
2016-05-08 12:14:10: ERROR[Main]:   ...est/games/minetest_tng/mods/default/lua/mapgen/ruins.lua:34: in function 'can_replace'
2016-05-08 12:14:10: ERROR[Main]:   ...est/games/minetest_tng/mods/default/lua/mapgen/ruins.lua:47: in function 'func'
2016-05-08 12:14:10: ERROR[Main]:   /usr/share/minetest/builtin/game/misc.lua:34: in function </usr/share/minetest/builtin/game/misc.lua:11>
2016-05-08 12:14:10: ERROR[Main]:   /usr/share/minetest/builtin/game/register.lua:369: in function </usr/share/minetest/builtin/game/register.lua:349>
flahaye commented 8 years ago

Hello,

I do a pull request (my first time, sorry if I make a mistake) that I expect to solve this problem.

If n is nil, the next line n.name lead to a crash, so I test this before.