Пишу простинький мод:
if minetest.check_player_privs(get_player_name(), {interact=true }) then
print("Player has all privs!")
else
print("Player is missing some privs!")
end
2018-07-22 17:45:48: WARNING[Main]: Undeclared global variable "get_player_name" accessed at ..../share/minetest/games/mineclone2/mods/test/init.lua:1
2018-07-22 17:45:48: ERROR[Main]: ModError: Failed to load and run script from /opt/minetest4/usr/local/bin/../share/minetest/games/mineclone2/mods/test/init.lua:
2018-07-22 17:45:48: ERROR[Main]: ..../share/minetest/games/mineclone2/mods/test/init.lua:1: attempt to call global 'get_player_name' (a nil value)
2018-07-22 17:45:48: ERROR[Main]: stack traceback:
2018-07-22 17:45:48: ERROR[Main]: ..../share/minetest/games/mineclone2/mods/test/init.lua:1: in main chunk