I keep getting this error when I start my game and try to load either a bool or an int.
FileNotFoundException: Could not find file "C:\Users\ThatGuyMiniB\AppData\LocalLow\Lazy Goblins\TiltBall\currency".
System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileStream.cs:305)
System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share)
(wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
System.IO.File.OpenRead (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:363)
System.IO.File.ReadAllBytes (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:538)
ES2FileUtility.ReadAllBytes (System.String path)
ES2FileStream.CreateReadStream ()
ES2FileStream..ctor (.ES2Settings settings, Operation operation)
ES2Stream.Create (.ES2Settings settings, Operation operation)
ES2Reader..ctor (.ES2Settings settings)
ES2Reader.Create (.ES2Settings settings)
ES2.Load[Int32] (System.String identifier)
Overlord.Awake () (at Assets/Scripts/Overlord.cs:61)
Not sure what this error means
Re: Not sure what this error means
Hi there,
This means that you're trying to load from a file which doesn't exist.
If you're not sure if a file will exist before loading, you should use ES2.Exists to check whether it exists before calling the load methods.
All the best,
Joel
This means that you're trying to load from a file which doesn't exist.
If you're not sure if a file will exist before loading, you should use ES2.Exists to check whether it exists before calling the load methods.
All the best,
Joel