thmsndk / Screeps3D

A 3D client for the MMORTS Screeps.com
90 stars 17 forks source link

NullReference in ShardInfoMonitor on my own private server #227

Closed thmsndk closed 4 years ago

thmsndk commented 4 years ago

Got this error, possibly because my server is running an outdated admin-utils or something else

NullReferenceException: Object reference not set to an instance of an object
  at Assets.Scripts.Screeps_API.ShardInfoMonitor.<GetShardInfo>b__13_0 (System.String jsonShardInfo) [0x00074] in C:\Projects\Screeps3D\Assets\Scripts\Screeps_API\ShardInfoMonitor.cs:65 
  at Screeps_API.ScreepsHTTP+<>c__DisplayClass4_0.<Request>b__0 (UnityEngine.Networking.UnityWebRequest outcome) [0x0024f] in C:\Projects\Screeps3D\Assets\Scripts\Screeps_API\ScreepsHTTP.cs:128 
  at Screeps_API.ScreepsHTTP+<SendRequest>d__5.MoveNext () [0x0008d] in C:\Projects\Screeps3D\Assets\Scripts\Screeps_API\ScreepsHTTP.cs:149 
  at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00026] in <3c98d859cfbd41c2b1a205da14987a37>:0 

(Filename: <3c98d859cfbd41c2b1a205da14987a37> Line: 0)
thmsndk commented 4 years ago

Seems to be an issue with not having set a shardName, admin utils does not return a default shard name. "Fixed" in commit 0bb1749055f097df98a8d9c91d04fbc8bbc1c626