Page 1 of 1

[0.18.14] player.get_associated_characters() API errors when player has no character

Posted: Thu Mar 19, 2020 10:45 pm
by Muppet9010
The documentation implies player.get_associated_characters() should return an empty array when their is no character for a player. Instead it gives an error: No character
https://lua-api.factorio.com/latest/Lua ... characters

Hit when run against a player who is in editor mode and thus has no character.

Re: [0.18.14] player.get_associated_characters() API errors when player has no character

Posted: Thu Mar 19, 2020 11:38 pm
by Rseding91
Thanks for the report however... no it doesn't?

That code path literally can't produce that error. In fact the only error it can produce is "invalid player" if you call it on a deleted LuaPlayer.

Re: [0.18.14] player.get_associated_characters() API errors when player has no character

Posted: Thu Mar 19, 2020 11:47 pm
by Muppet9010
ah crap I was caching a function in Factorio global inadvertently, so was running old code.