Hello all,
I’ve been having an issue when trying to run run_match.py in powershell. I found a similar issue held by a different user, but there was no real solution to the problem. I have downloaded the most up-to-date version of the C1GamesStarterKit-master. With a completely fresh install of of the starter kit I get hit with this error
0 P1 {“p2Units”:[[],[],[],[],[],[],[]],“turnInfo”:[0,0,-1],“p1Stats”:[30.0,25.0,5.0,0],“p1Units”:[[],[],[],[],[],[],[]],“p2Stats”:[30.0,25.0,5.0,0],“events”:{“selfDestruct”:[],“breach”:[],“damage”:[],“shield”:[],“move”:[],“spawn”:[],“death”:[],“attack”:[],“melee”:[]}} Invalid command, couldn’t json for player 0 : {“p2Units”:[[],[],[],[],[],[],[]],“turnInfo”:[0,0,-1],“p1Stats”:[30.0,25.0,5.0,0],“p1Units”:[[],[],[],[],[],[],[]],“p2Stats”:[30.0,25.0,5.0,0],“events”:{“selfDestruct”:[],“breach”:[],“damage”:[],“shield”:[],“move”:[],“spawn”:[],“death”:[],“attack”:[],“melee”:[]}} com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path
at com.google.gson.Gson.fromJson(Gson.java:899)
at com.google.gson.Gson.fromJson(Gson.java:852)
at com.google.gson.Gson.fromJson(Gson.java:801)
at com.c1games.terminal.game.Parser.processInputForPlayer(Parser.java:178)
at com.c1games.terminal.game.Parser.processInputDeploy(Parser.java:354)
at com.c1games.terminal.game.GameMain.runLoop(GameMain.java:341)
at com.c1games.terminal.game.GameMain.startGame(GameMain.java:197)
at com.c1games.terminal.game.GameMain.main(GameMain.java:169)
at com.c1games.terminal.Terminal.main(Terminal.java:104)
Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path
at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:350)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:80)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61)
at com.google.gson.Gson.fromJson(Gson.java:887)
… 8 more
I apologize in advance for the garbled chunk of error. I am running Windows 64-bit, i have java 11.0.1 installed, I changed my powershell script resriction to unrestricted. I am not sure what there is left to try.