CBugDCoder / tower_defense

Tower Defense for Minetest
Other
2 stars 0 forks source link

Attempt to join game causes Server Error #1

Open Beanzilla opened 3 years ago

Beanzilla commented 3 years ago

The server logs:

2021-02-03 12:03:17: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'tower_defense' in callback environment_Step(): ...home/minetest_user/.minetest/mods/tower_defense/shop.lua:5: attempt to call field 'get_page' (a nil value)
2021-02-03 12:03:17: ERROR[Main]: stack traceback:
2021-02-03 12:03:17: ERROR[Main]:   ...home/minetest_user/.minetest/mods/tower_defense/shop.lua:5: in function 'func'
2021-02-03 12:03:17: ERROR[Main]:   ...e/minetest_user/minetest/bin/../builtin/common/after.lua:20: in function '?'
2021-02-03 12:03:17: ERROR[Main]:   .../minetest_user/minetest/bin/../builtin/game/register.lua:426: in function <.../minetest_user/minetest/bin/../builtin/game/register.lua:410>

The mods list:

Beanzilla commented 3 years ago

I added this to shop.lua

local sfinv = rawget(_G, "sfinv") or nil

And now all things work. Thank you for a great mod.

Beanzilla commented 3 years ago

Not sure if it's me or not but it just seems like the prices of things are really expensive. (Not sure if that is because you found it too easy for multiple players on a single game or what)

No big deal though, I just changed the prices for my local copy (since it will just be singleplayer)