Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.NullReferenceException: Object reference not set to an instance of an object #50

Open
nesa24 opened this issue Mar 10, 2016 · 2 comments

Comments

@nesa24
Copy link

nesa24 commented Mar 10, 2016

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

@shiro900
Copy link

shiro900 commented Apr 24, 2016

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.

@ThanosSiopoudis
Copy link
Owner

There is a better example with callbacks in the Readme.md file.
Use something like

fmcore.GameLoaded += new Action(GameLoaded);

...

public void GameLoaded() {
...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants