I'm working on implementing the save system into my game, and I'm running into the following error when I try to load the data:
Code: Select all
Dialogue System: Lua code 'Variable={Alert="", activeHuntQuest="Pest Removal", Deck=2, enemiesKilled=0, enemiesToKill=5, enemyTypeToKill="goblin", ["chest.0"]=false, ["chest.1"]=false, ["chest.2"]=false, Actor="Guard", Conversant="Player", ActorIndex="Route_1_West_Guard", ConversantIndex="Player"}; Item["My_First_Deck"].State="success"; Item["Pest_Removal"].State="active"; Item["Pest_Removal"].Track=true; Item["Pest_Removal"].Entry_1_State="active"; Item["Definitely_Not_Bribery"].State="active"; Actor={Player={Name="Player", Pictures="[]", Description="You", IsPlayer=true}, Eredith={Name="Eredith", Pictures="[]", Description="Wisewoman", IsPlayer=false}, Route_1_West_Guard={Name="Route 1 West Guard", Pictures="[]", Description="Guard", IsPlayer=false, Display_Name="Guard"}, Dolores={Name="Dolores", Pictures="[]", Description="Baker", IsPlayer=false}, Sana={Name="Sana", Pictures="[]", Description="Healer", IsPlayer=false, HasMet=false}, Tabor={Name="Tabor", Pictures="[]", Description="Shopkeeper", IsPlayer=false, HasMet=false}, Blackbread={Name="Blackbread", Pictures="[]", Description="Banker", IsPlayer=false, HasMet=false}}; StatusTable = ""; RelationshipTable = ""; ' threw exception 'Cannot assign to a null value. Are you trying to assign to a nonexistent table element?.'
UnityEngine.Debug:LogError(Object)
PixelCrushers.DialogueSystem.Lua:RunRaw(String, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter/Lua.cs:228)
PixelCrushers.DialogueSystem.Lua:Run(String, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter/Lua.cs:129)
PixelCrushers.DialogueSystem.Lua:Run(String, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter/Lua.cs:139)
PixelCrushers.DialogueSystem.PersistentDataManager:ApplyLuaInternal(String, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Save System/PersistentDataManager.cs:260)
PixelCrushers.DialogueSystem.PersistentDataManager:ApplySaveData(String, DatabaseResetOptions) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Save System/PersistentDataManager.cs:246)
MainMenu:ContinueGame() (at Assets/Scripts/MainMenu.cs:13)
UnityEngine.EventSystems.EventSystem:Update() (at D:/Unity_Dev/2019.4.6f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)
Code: Select all
PixelCrushers.DialogueSystem.PersistentDataManager.GetSaveData();
ES3.Save<string>("dbSave", save);
Code: Select all
PixelCrushers.DialogueSystem.PersistentDataManager.ApplySaveData(ES3.Load<string>("dbSave"));