splewis/get5

Loading a .cfg team file causes a parsing error

PiotrWodecki opened this issue · 0 comments

Expected behavior

Loading a .cfg team file from the example present in the documentation should import a team.

Actual behavior

Import fails with multiple identical error messages:
KeyValues Error: LoadFromBuffer: missing { in file teams/example.cfg

Details

Versions and debug log

Steps to reproduce

KeyValues Error: LoadFromBuffer: missing { in file teams/example.cfg

KeyValues Error: LoadFromBuffer: missing { in file teams/example.cfg

KeyValues Error: LoadFromBuffer: missing { in file teams/example.cfg

KeyValues Error: LoadFromBuffer: missing { in file teams/example.cfg

KeyValues Error: LoadFromBuffer: missing { in file teams/example.cfg

KeyValues Error: LoadFromBuffer: missing { in file teams/example.cfg

KeyValues Error: LoadFromBuffer: missing { in file teams/example.cfg

KeyValues Error: LoadFromBuffer: missing { in file teams/example.cfg

KeyValues Error: LoadFromBuffer: missing { in file teams/example.cfg

KeyValues Error: LoadFromBuffer: missing { in file teams/example.cfg

KeyValues Error: LoadFromBuffer: missing { in file teams/example.cfg

KeyValues Error: LoadFromBuffer: missing { in file teams/example.cfg
(*coaches*), 
Loaded team data for team1
  • get5_status will show that the team wasn't imported
{
    "matchid": "example_match",
    "team2": {
        "side": "t",
        "current_map_score": 0,
        "connected_clients": 0,
        "name": "Fnatic",
        "series_score": 0,
        "ready": false
    },
    "team1": {
        "side": "ct",
        "current_map_score": 0,
        "connected_clients": 0,
        "name": "",
        "series_score": 0,
        "ready": false
    },
    "gamestate": "pre_veto",
    "loaded_config_file": "addons\/sourcemod\/get5\/example_match.cfg",
    "round_number": -1,
    "plugin_version": "0.11.0",
    "map_number": 0,
    "paused": false,
    "round_time": 38468
}

Workaround

Placing additional { at the beginning of the teams/example.cfg will result in a successful import.