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

Client error related to translations #1695

Closed
mexikoedi opened this issue Dec 9, 2024 · 2 comments · Fixed by #1697
Closed

Client error related to translations #1695

mexikoedi opened this issue Dec 9, 2024 · 2 comments · Fixed by #1697
Assignees
Labels
status/needs validation Needs to be tested/validated by a project member

Comments

@mexikoedi
Copy link
Contributor

mexikoedi commented Dec 9, 2024

Your version of TTT2 (mandatory)

  • TTT2 v0.14.0b Workshop version from Steam

Describe the bug (mandatory)

The issue appeared for the first time for only one player. He got an error which is related to translations. We don't know why this error happened because we only noticed it later on. Maybe it is an edge case like dying/disconnecting/... at the time the code tries to run or something in that direction. There could be a missing check at the code section.

To reproduce

Steps to reproduce the behaviour:

  1. Go into a round (maybe try the collection below)
  2. Play some rounds and try to trigger the error
  3. See the described issue and error

Expected behaviour

This error shouldn't appear for the player.

Context (please provide as much as you can)

[TTT2 (Base) - v0.14.0b] gamemodes/terrortown/gamemode/client/cl_lang.lua:543: bad argument #1 to 'pairs' (table expected, got string)
  1. pairs - [C]:-1
   2. Msg - gamemodes/terrortown/gamemode/client/cl_lang.lua:543
    3. ClientUse - gamemodes/terrortown/entities/entities/ttt_base_placeable.lua:70
     4. unknown - gamemodes/terrortown/gamemode/client/cl_keys.lua:97

Additional context

We never saw this error in prior TTT2 versions.
Maybe it is only an issue in TTT2 v0.14.0.

@Histalek Histalek added the status/needs validation Needs to be tested/validated by a project member label Dec 10, 2024
@Histalek Histalek self-assigned this Dec 10, 2024
@Histalek
Copy link
Member

I have a loose idea of what might be going on here, but i haven't been able to reproduce this yet

that player probably tried to pickup a radio/visualizer/decoy/beacon that didn't belong to them, could that be correct?

Histalek added a commit that referenced this issue Dec 10, 2024
Fixes #1695

We call `LANG.Msg` on the client which doesn't have a way to address a
specific player, therefore we have used wrong parameters here.
Histalek added a commit that referenced this issue Dec 10, 2024
Fixes #1695

We call `LANG.Msg` on the client which doesn't have a way to address a
specific player, therefore we have used wrong parameters here.
@mexikoedi
Copy link
Contributor Author

I have a loose idea of what might be going on here, but i haven't been able to reproduce this yet

that player probably tried to pickup a radio/visualizer/decoy/beacon that didn't belong to them, could that be correct?

Yes that could be it, there were beacons placed by a Detective who wasn't the player who got the error.

Histalek added a commit that referenced this issue Dec 10, 2024
Fixes #1695

We call `LANG.Msg` on the client which doesn't have a way to address a
specific player, therefore we have used wrong parameters here.
Histalek added a commit that referenced this issue Dec 10, 2024
We call `LANG.Msg` on the client which doesn't use the first parameter
to address a player. This shifts all the parameters to the wrong places.

Fixes #1695
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/needs validation Needs to be tested/validated by a project member
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants