I'm getting this error for whatever reason:
ArgumentException: An element with the same key already exists in the dictionary.
System.Collections.Generic.Dictionary`2[System.String,System.Object].Add (System.String key, System.Object value) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
ES2Data.Add (System.String tag, System.Object value)
ES2Reader.ReadAll ()
ES2.LoadAll (System.String path)
GameManager.ReadData () (at Assets/Code/GameManager.cs:290)
GameManager.Awake () (at Assets/Code/GameManager.cs:205)
My code for loading this data is simply this:
Code: Select all
public void ReadData()
{
string path = _worlds.CurrentWorld + "/Data.txt";
if (ES2.Exists(path))
{
ES2Data data = ES2.LoadAll(path);
if (OnLoad != null)
OnLoad(data);
}
}
I'm not entirely sure which details I can give, because I have no idea what is causing this error or where it's happening. It seems to be happening internally in that ES2Data.Add method, where the tag is a duplicate.
Is there a way I could have caused this error, or is it an Easy Save bug?
Thanks in advance.