I wrote a simple code to place a HUD image on the screen. As a typical mod, it functions exactly as expected. However, using the exact same code as a CSM, I get the following error:
ERROR[Main]: ...est-0.4.16-win32-msvc\bin\..\clientmods\box\init.lua:1: attempt to call field 'register_on_joinplayer' (a nil value)
Any ideas?
Mod works, identical code does not work client-side
- rubenwardy
- Moderator
- Posts: 6972
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: Mod works, identical code does not work client-side
As the error suggests, that function does not exist. Learning to read error messages is rather important as a programming skill
Have a look here for available functions: https://github.com/minetest/minetest/bl ... ua_api.txt
Have a look here for available functions: https://github.com/minetest/minetest/bl ... ua_api.txt
Re: Mod works, identical code does not work client-side
Your link is a 404
- rubenwardy
- Moderator
- Posts: 6972
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Who is online
Users browsing this forum: No registered users and 4 guests