FMScoutFramework
FMScoutFramework copied to clipboard
System.NullReferenceException: Object reference not set to an instance of an object
System.NullReferenceException: Object reference not set to an instance of an object. at FMScoutFramework.Core.FMCore.GetListFromStoreT
setup solution as in http://www.fmscout.com/a-fmscout-framework.html for visualstudio
builded dll and app
when debugging it points me to
> FMScoutFramework.dll!FMScoutFramework.Core.FMCore.GetListFromStore<FMScoutFramework.Core.Entities.InGame.Player>() Line 41 C#
and that is
private IQueryable<T> GetListFromStore<T>()
{
return ((Dictionary<int, T>)objectManager.ObjectStore [typeof(T)]).Values.AsQueryable ();
}
objectManager is null any help please
You have to use Thread.Sleep(1000);
before you call something like var list = fmCore.Clubs.ToList();
because the loading is running async and it needs time to load.
There is a better example with callbacks in the Readme.md file. Use something like
fmcore.GameLoaded += new Action(GameLoaded);
...
public void GameLoaded() {
...
}