Page 1 of 1

Include player information in errors

Posted: Tue Oct 28, 2025 4:35 am
by PennyJim
I've seen a handful of mod bug reports where a player related event errors on a server, and people struggle to really explain what would have caused it because they aren't sure who caused it.

I'm proposing that for events related to a player (any that have a player_index), the ID and username of the player gets listed alongside the event ID.
I think this might also help with Crashes if you can do something similar there.

I'm imagining something like this:
Error while running event MouseOverConstruction::on_selected_entity_changed (ID 61, PlayerID 2: PennyJim)
Maybe the player's username should stand out a little more so people can spot it and then try and think of how they would have caused it in the moment. I would hope that the natural pattern recognition that is in overdrive for your own name would spot it, but who knows.

I think having both the user index and the username is important because the dev reacting to it likely wants the former, and the user needs the latter to give it context.

Re: Include player information in errors

Posted: Tue Oct 28, 2025 4:47 am
by protocol_1903
+1, very useful for serverlogging errors