General Inaptitude Posted June 3, 2019 Share Posted June 3, 2019 Hello, I was working on a command to output player information but ran into quite the snag trying to consume the PlayerId field property from the Player (server) object. However, I have tried everything I can think of, but it just will not work. Other fields on the player object seem to consume just fine from the code I just wrote @ https://github.com/Joeppie/AvorionAdminScripts/blob/master/playerinfolist.lua The following things do not work: /run print (Player().id.id) /run print (Player().id.name) error: 'attempt to index UserData value' for k, v in pairs(getmetatable(Player().id)) do print(k, type(v)) end error: table is nil. A 'normal' pairs construction to try and consume the player.id fields also does not work. The following does work: /run print(Player().id) outputs 'PlayerId' I am unsure what to make of this, it might be that there are some things missing in the game code which expose the UserData PlayerId properly to the game? If this is a bug, it would be nice to fix, since right now admins have a hard time understanding which steam ID is associated with a player unless they look into the log file to see when people logged in to (attempt) to correlate steam IDs with user names. Steam nowadays allows you to delete your previous usernames, and Avorion does continue to use the original name someone has logged in with for the entire lifespan of the save file. This can mean that people can hide behind a different name. Thank you for your time, and thank you @ Rinart73 for helping diagnose this problem. - Inaptitude Link to comment Share on other sites More sharing options...
Boxelware Team koonschi Posted June 4, 2019 Boxelware Team Share Posted June 4, 2019 Hi! Thanks for reporting the issue. Will be fixed in the next update! Link to comment Share on other sites More sharing options...
General Inaptitude Posted June 5, 2019 Author Share Posted June 5, 2019 Thanks for the confirmation this will be fixed! It makes life a lot easier, especially when there are little bugs around that make a <server> say things like "Your non responsiveness is interpreted as a hostile act". I was seriously hunting for a trolling Steam player/user! ;D Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now