Jump to content

Can we use savedVariables?


Ordush

Recommended Posts

So yeah, another problem.
The

CurrentSetting.PushToLua();

Overwrites the settings and sets everything to what default is, because it loads the settings before it does FetchFromLua. I tried doing

try
        {
            if (File.Exists(AdviserFilePathAndName("CustomClass-HunterBeastmaster", ObjectManager.Me.Name + "." + Usefuls.RealmName)))
            {
                CurrentSetting = Load<HunterBeastmasterSettings>(AdviserFilePathAndName("CustomClass-HunterBeastmaster", ObjectManager.Me.Name + "." + Usefuls.RealmName));
                if (Updateloaded)
                {
                CurrentSetting.PushToLua();
                }
                return true;
            }
            CurrentSetting = new HunterBeastmasterSettings();
            
        }
        catch (Exception e)
        {
            Logging.WriteError("HunterBeastmasterSettings > Load(): " + e);
        }
        return false;

So it would first push the lua after it had loaded the settings, but that did not work. apparently i can't make an if there.
Any help would be appreciated.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...