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

Possible workaround needed for get_player_information returning nil #2587

Closed
paramat opened this issue Feb 6, 2020 · 1 comment
Closed
Labels

Comments

@paramat
Copy link
Contributor

paramat commented Feb 6, 2020

Just a reminder to check before 5.2.0 release if a workaround is needed in MTG, if minetest/minetest#9352 is not fixed for 5.2.0 release (but it probably will be).
See engine issue for details, code is here:

minetest.register_on_joinplayer(function(player)
-- Set formspec prepend
local formspec = [[
bgcolor[#080808BB;true]
listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF] ]]
local name = player:get_player_name()
local info = minetest.get_player_information(name)
if info.formspec_version > 1 then
formspec = formspec .. "background9[5,5;1,1;gui_formbg.png;true;10]"
else
formspec = formspec .. "background[5,5;1,1;gui_formbg.png;true]"
end
player:set_formspec_prepend(formspec)

@paramat paramat added the Bug label Feb 6, 2020
@paramat paramat added this to the 5.2.0 milestone Feb 6, 2020
@paramat paramat added Blocker and removed Blocker labels Mar 7, 2020
@paramat
Copy link
Contributor Author

paramat commented Mar 8, 2020

Fixed in engine.

@paramat paramat closed this as completed Mar 8, 2020
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

1 participant