Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[register_lbm farming api] Name farming:start_nodetimer_ does not follow naming conversation #1114

Closed
adrido opened this issue May 28, 2016 · 4 comments
Labels

Comments

@adrido
Copy link
Contributor

adrido commented May 28, 2016

Hi,
I have troubles to get a mod working with minetest 0.4.14 which worked fine in 0.4.13
I found out that the problem seems to be in the new farming API line 352.
if you register a new plant with farming.register_plant("mymod:myplant",{...}) you will get an error because lbm does not following "naming conventions"

reproducable: yes

Code from logfile:

2016-05-28 18:30:32: ERROR[Main]: ModError: Failed to load and run script from /home/minetest/minetest/bin/../games/minetest/mods/beer_test/init.lua:
2016-05-28 18:30:32: ERROR[Main]: /home/minetest/minetest/bin/../builtin/game/register.lua:62: Name farming:start_nodetimer_beer_test_oats does not follow naming conventions: "beer_test:" or ":" prefix required
2016-05-28 18:30:32: ERROR[Main]: stack traceback:
2016-05-28 18:30:32: ERROR[Main]:   [C]: in function 'error'
2016-05-28 18:30:32: ERROR[Main]:   /home/minetest/minetest/bin/../builtin/game/register.lua:62: in function 'check_modname_prefix'
2016-05-28 18:30:32: ERROR[Main]:   /home/minetest/minetest/bin/../builtin/game/register.lua:85: in function 'register_lbm'
2016-05-28 18:30:32: ERROR[Main]:   ...test/bin/../games/minetest/mods/mtg_core/farming/api.lua:352: in function 'register_plant'
2016-05-28 18:30:32: ERROR[Main]:   ...in/../games/minetest/mods/beer_test/mod_files/plants.lua:242: in main chunk
2016-05-28 18:30:32: ERROR[Main]:   [C]: in function 'dofile'
2016-05-28 18:30:32: ERROR[Main]:   ...t/minetest/bin/../games/minetest/mods/beer_test/init.lua:21: in main chunk

I assume line 353 schould look like this:

        name = mname..":start_nodetimer_" .. mname .. "_" .. pname,

instead of

        name = "farming:start_nodetimer_" .. mname .. "_" .. pname,
@sofar
Copy link
Contributor

sofar commented May 28, 2016

try

name = ":" .. mname..":start_nodetimer_" .. mname .. "_" .. pname,

instead, and let us know if that works.

@paramat paramat added the Bug label May 29, 2016
@adrido
Copy link
Contributor Author

adrido commented May 29, 2016

yes, this works too

@sofar
Copy link
Contributor

sofar commented May 29, 2016

This is only a bug in current git, not 0.4.14.

@sofar
Copy link
Contributor

sofar commented May 29, 2016

@adrido would be nice if you can retest and comment in #1115 whether that fixes it for you as well (patch is slightly different).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants