Page 1 of 1

Mod works, identical code does not work client-side

PostPosted: Mon Apr 09, 2018 19:13
by KCoombes
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?

Re: Mod works, identical code does not work client-side

PostPosted: Mon Apr 09, 2018 19:16
by rubenwardy
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

Re: Mod works, identical code does not work client-side

PostPosted: Mon Apr 09, 2018 19:19
by KCoombes
Your link is a 404

Re: Mod works, identical code does not work client-side

PostPosted: Mon Apr 09, 2018 19:19
by rubenwardy
Fixed