splewis / get5

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

Loading a .cfg team file causes a parsing error #942

Closed PiotrWodecki closed 1 year ago

PiotrWodecki commented 1 year ago

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 (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.