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.
[0.18.14] player.get_associated_characters() API errors when player has no character
- Muppet9010
- Filter Inserter
- Posts: 278
- Joined: Sat Dec 09, 2017 6:01 pm
- Contact:
Re: [0.18.14] player.get_associated_characters() API errors when player has no character
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.
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.
If you want to get ahold of me I'm almost always on Discord.
- Muppet9010
- Filter Inserter
- Posts: 278
- Joined: Sat Dec 09, 2017 6:01 pm
- Contact:
Re: [0.18.14] player.get_associated_characters() API errors when player has no character
ah crap I was caching a function in Factorio global inadvertently, so was running old code.