Mod works, identical code does not work client-side

Post Reply
KCoombes
Member
Posts: 427
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt
Location: SW Florida, USA

Mod works, identical code does not work client-side

by KCoombes » Post

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?

User avatar
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

by rubenwardy » Post

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
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

KCoombes
Member
Posts: 427
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt
Location: SW Florida, USA

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

by KCoombes » Post

Your link is a 404

User avatar
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

by rubenwardy » Post

Fixed
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests