The name 'ES3' does not exist in the current context?

Discussion and help for Easy Save 3
Post Reply
ryzeonline
Posts: 5
Joined: Sat Apr 04, 2020 4:07 pm

The name 'ES3' does not exist in the current context?

Post by ryzeonline »

OK, I took the plunge and bought the asset.

Imported it from the asset store into a project.

Created a script copied straight from the getting started guide:

...yadda yaddad class declaration...

Code: Select all

{
public float myKey;

// This checks whether "myKey" exists before trying to load it.
if(ES3.KeyExists("myKey"))
    myValue = ES3.Load<float>("myKey");
}

It refuses to compile and spits out this error:

Code: Select all

 error CS0103: The name 'ES3' does not exist in the current context
I've spent hours backing up my project, re-installing the asset, testing in a new project, etc. and can't figure it out. It's probably something I'm doing wrong, but I'd appreciate any help if possible, thanks everyone.

User avatar
Joel
Moodkie Staff
Posts: 2755
Joined: Wed Nov 07, 2012 10:32 pm

Re: The name 'ES3' does not exist in the current context?

Post by Joel »

Hi there,

The most common cause for this is that there are other errors being thrown in the console, so Unity cannot compile Easy Save 3 until these are resolved. Please could you check that there are no other errors in console?

Also have you moved Easy Save from the Assets/Plugins folder? It's placed in this location to ensure that it's compiled before anything else, so removing it from here will prevent you from being able to access Easy Save from any scripts which are compiled in the first pass.

If neither of these resolve the issue, please could you private message me a basic project which replicates this?

All the best,
Joel
Joel @ Moodkie Interactive
Twitter - Unity

ryzeonline
Posts: 5
Joined: Sat Apr 04, 2020 4:07 pm

Re: The name 'ES3' does not exist in the current context?

Post by ryzeonline »

Thanks so much for the tips and ideas Joel, especially on a Sunday! I appreciate it, I'll look into all your suggestions and let you know about my progress.

ryzeonline
Posts: 5
Joined: Sat Apr 04, 2020 4:07 pm

Re: The name 'ES3' does not exist in the current context?

Post by ryzeonline »

Ok, so I cleared up a bunch of compiler errors, and my project is clean AF :)


But I still get the ES3 doesn't exist error with a simple import and copy the 2 line script test from the guides.


So I tried it in a blank project, and there were no errors.


So I guess it's something in my project that's causing the problem, but now that I've fixed all compiler errors, I don't see how that could be.


Anyway, since I need this to work with my project, and I can't figure out what's left to fix, I think I'll have to pass on the asset and explore other options, sadly. Thanks for all your help and pointers Joel, and I can tell it's an amazing asset, just not for me. Am I able to get a refund?

User avatar
Joel
Moodkie Staff
Posts: 2755
Joined: Wed Nov 07, 2012 10:32 pm

Re: The name 'ES3' does not exist in the current context?

Post by Joel »

Hi there,

If you send me a project which replicates this then I should be able to immediately see what is happening.

However, if you would prefer a refund please private message me your invoice number and I’ll request an approval from Unity.

All the best,
Joel
Joel @ Moodkie Interactive
Twitter - Unity

ryzeonline
Posts: 5
Joined: Sat Apr 04, 2020 4:07 pm

Re: The name 'ES3' does not exist in the current context?

Post by ryzeonline »

Joel wrote:Hi there,

If you send me a project which replicates this then I should be able to immediately see what is happening.

However, if you would prefer a refund please private message me your invoice number and I’ll request an approval from Unity.

All the best,
Joel

I totally appreciate it Joel, truly.


Unfortunately, it works fine on a fresh import in a fresh project - so no real point sending you that. But on a fresh import on my now-clean project, it doesn't. I could try sending you that, but the project is like 8gb .zipped.


I may buy it again later when I have a superior coder on my team or perhaps it gets updated or I'll consider it when I start a new project.


Thanks for being so understanding, I'll PM you, wishing you a great day.

Post Reply