splewis / get5

CS:GO Sourcemod plugin for competitive matches/scrims
GNU General Public License v3.0
557 stars 174 forks source link

Exception reported: Client index 1195986043 is invalid (arg 4) #893

Closed Gryfenfer97 closed 2 years ago

Gryfenfer97 commented 2 years ago

Expected behavior

I just expect to start the match when each team write !forceready in the chat and not throw any error.

Actual behavior

I get the following error when someone write !forceready

L 10/13/2022 - 15:01:09: [SM] Exception reported: Client index 1195986043 is invalid (arg 4)
L 10/13/2022 - 15:01:09: [SM] Blaming: get5.smx
L 10/13/2022 - 15:01:09: [SM] Call stack trace:
L 10/13/2022 - 15:01:09: [SM]   [0] FormatNativeString
L 10/13/2022 - 15:01:09: [SM]   [1] Line 40, get5/scripting/get5/natives.sp::Native_Message
L 10/13/2022 - 15:01:09: [SM]   [3] Get5_Message
L 10/13/2022 - 15:01:09: [SM]   [4] Line 234, get5/scripting/get5/readysystem.sp::Command_ForceReadyClient

Steps to reproduce

here is the match config

{
  "matchid": "1",
  "num_maps": 1,
  "maplist": [
    "de_vertigo",
    "de_dust2",
    "de_inferno",
    "de_mirage",
    "de_nuke",
    "de_overpass",
    "de_ancient"
  ],
  "skip_veto": false,
  "veto_first": "team1",
  "side_type": "standard",
  "players_per_team": 5,
  "min_players_to_ready": 1,
  "min_spectators_to_ready": 0,
  "spectators": {
    "players": [
      "76561198xxxxxxxxx",
      "76561198xxxxxxxxx",
      "76561198xxxxxxxxx",
      "76561198xxxxxxxxx",
      "76561198xxxxxxxxx",
      "76561198xxxxxxxxx",
      "76561198xxxxxxxxx",
      "76561198xxxxxxxxx"
    ]
  },
  "team1": {
    "name": "t1",
    "tag": "t1",
    "players": [
      "76561198xxxxxxxxx",
      "76561198xxxxxxxxx",
      "76561198xxxxxxxxx",
      "76561198xxxxxxxxx",
      "76561198xxxxxxxxx"
    ],
    "series_score": 0
  },
  "team2": {
    "name": "t2",
    "tag": "t2",
    "players": [
      "76561198xxxxxxxxx",
      "76561198xxxxxxxxx",
      "76561198xxxxxxxxx",
      "76561198xxxxxxxxx",
      "76561198xxxxxxxxx"
    ],
    "series_score": 0
  },
  "cvars": {
    "hostname": "team 1 vs. team 2",
    "get5_check_auths": "1",
    "get5_server_id": "27015",
    "get5_event_api_url": "http://127.0.0.1/api/events/"
  }
}

I installed Get5 with steamworks and get5_eventapi.

nickdnk commented 2 years ago

Hello

Did you update your translations folder?

Also, you should not put get5_server_id in the cvars section, as those variables will be copied into backup files, so loading a backup on a diferent host will change its server ID.

nickdnk commented 2 years ago

I cannot reproduce this.

Screenshot from 2022-10-13 19-18-35

nickdnk commented 2 years ago

Also, in 0.11 you can replace get5_eventapi with the built-in logging system: https://splewis.github.io/get5/dev/events_and_forwards/#http - you are welcome to test this. Anything on 0.9+ is not going to work with that plugin as the forwards have changed anyway.

Gryfenfer97 commented 2 years ago

I have an old version of the translations that I edited, I will try to update with the built-in translations

I will also change get5_eventapi with the built-in logging system. Thank's for the advice.

I'll keep you up to track on this.

nickdnk commented 2 years ago

I have an old version of the translations that I edited, I will try to update with the built-in translations

I will also change get5_eventapi with the built-in logging system. Thank's for the advice.

I'll keep you up to track on this.

You should always update the translations folder when you update the plug-in, as we may move things around. Your error looks like a string passed to an integer argument in a translation.

Gryfenfer97 commented 2 years ago

Indeed, the problem was coming from the translation. I just copy paste the version from the github and it works now.

nickdnk commented 2 years ago

Indeed, the problem was coming from the translation. I just copy paste the version from the github and it works now.

Remember to replace it for all languages, not just the English version. The server will use the version that matches a client's language, which is outside your control.

Gryfenfer97 commented 2 years ago

I've edited the english and the french version. All the other translations are the originals from get5 0.11

nickdnk commented 2 years ago

I've edited the english and the french version. All the other translations are the originals from get5 0.11

The French version is missing a bunch of strings. If you speak French (well), you are welcome to open a PR with corrections. You can find all strings and their uses/explanation here: https://splewis.github.io/get5/dev/translations/#reference