Solved: Apply Saved Data throws exceptions
Posted: Sun Dec 08, 2019 9:34 am
Hello,
I have a problem with loading saved dialogue data from file.
I am using PersistentDataManager.GetSaveData(); to save it to string and then to json file.
To retrieve data I am using method: PersistentDataManager.ApplySavedData(data); but the data isn't loading and the
exception is being thrown.
Am I doing something wrong?
I have a problem with loading saved dialogue data from file.
I am using PersistentDataManager.GetSaveData(); to save it to string and then to json file.
To retrieve data I am using method: PersistentDataManager.ApplySavedData(data); but the data isn't loading and the
exception is being thrown.
Am I doing something wrong?
Code: Select all
'Variable={Alert="", Ego=-2, Actor="Liam", Conversant="John", ActorIndex="Liam", ConversantIndex="John"}; Item["Dinner"]={Name="Dinner", Pictures="[]", Description="", Success_Description="", Failure_Description="", State="active", Is_Item=false, Entry_Count=3, Entry_2_State="success", Entry_2="BuyFood", Entry_3_State="unassigned", Entry_3="Prepare food", Entry_1="Find out what Jerome wants to eat", Entry_1_State="success", }; Item["InventoryShop"]={Name="InventoryShop", Pictures="[]", Description="", Is_Item=true, Tomato=2, Lettuce=3, Cucumber=0, Feta=0, }; Item["Inventory"]={Name="Inventory", Pictures="[]", Description="", Is_Item=true, Tomato=3, Lettuce=0, Cucumber=0, }; Item["DinnerIntro"]={Name="DinnerIntro", Pictures="[]", Description="", Success_Description="", Failure_Description="", State="success", Is_Item=false, }; Item["Cornerstones"]={Name="Cornerstones", Pictures="[]", Description="", Is_Item=true, MailFound=false, JohnConfessed=false, }; Item["LostAndFound"]={Name="LostAndFound", Pictures="[]", Description="", Success_Description="", Failure_Description="", State="unassigned", Is_Item=false, }; Item["Tomato"]={Count=3, }; Item["Cucumber"]={Count=3, }; Item["Lettuce"]={Count=3, }; Item["Feta"]={Count=1, }; Actor={Liam={Name="Liam", Pictures="[]", Description="", IsPlayer=true}, John={Name="John", Pictures="[]", Description="", IsPlayer=false}, Jerome={Name="Jerome", Pictures="[]", Description="", IsPlayer=false}}; Conversation[1]={Title="ShopAssistant", Pictures="[]", Description="", Actor=1, Conversant=2}; Conversation[2]={Title="Jerome_DemoStart", Pictures="[]", Description="", Actor=1, Conversant=3}; Conversation[3]={Title="Jerome", Pictures="[]", Description="", Actor=1, Conversant=3}; Conversation[4]={Title="Dinner/DinnerServed", Pictures="[]", Description="", Actor=1, Conversant=3}; Conversation[5]={Title="Dinner\BarkCooking", Pictures="[]", Description="", Actor=1, Conversant=3}; Conversation[6]={Title="Common/TabletBark", Pictures="[]", Description="", Actor=1, Conversant=3}; Conversation[7]={Title="Common/JeromeHouse/DoorBark", Pictures="[]", Description="", Actor=1, Conversant=3}; Conversation[8]={Title="Common/NoteTipBark", Pictures="[]", Description="", Actor=1, Conversant=3}; Conversation[9]={Title="Common/JeromeHouse/Bear", Pictures="[]", Description="", Actor=1, Conversant=3}; Conversation[10]={Title="Common/JeromeHouse/Bed", Pictures="[]", Description="", Actor=1, Conversant=3}; Conversation[11]={Title="Common/JeromeHouse/Wardrobe", Pictures="[]", Description="", Actor=1, Conversant=3}; Conversation[12]={Title="Common/JeromeHouse/BookShelf", Pictures="[]", Description="", Actor=1, Conversant=3}; Conversation[13]={Title="Common/BlockOfFlats/RandomDoors", Pictures="[]", Description="", Actor=1, Conversant=3}; Conversation[14]={Title="LostAndFound/RobPhoneCall", Pictures="[]", Description="", Actor=1, Conversant=3}; Conversation[15]={Title="LostAndFound/RobFlat", Pictures="[]", Description="", Actor=1, Conversant=3}; Conversation[16]={Title="New Conversation 16", Pictures="[]", Description="", Actor=1, Conversant=2}; Conversation[17]={Title="Dinner/ServeTip", Pictures="[]", Description="", Actor=1, Conversant=2}; StatusTable = ""; RelationshipTable = ""; ' threw exception 'Code has syntax errors:
Line 1, Col 109 'm': Failed to parse Letter of Name.
Line 1, Col 109 'm': Failed to parse Name of VarName.
Line 1, Col 109 'm': Failed to parse 'nil' of NilLiteral.
Line 1, Col 109 'm': Failed to parse Text of BoolLiteral.
Line 1, Col 109 'm': Failed to parse '0'...'9' of Digit.
Line 1, Col 109 'm': Failed to parse (Digit)+ of FloatNumber.
Line 1, Col 109 'm': Failed to parse Name of VariableArg.
Line 1, Col 109 'm': Failed to parse firstTerm of OperatorExpr.
Line 1, Col 109 'm': Failed to parse Expr of ExprStmt.
Line 1, Col 109 'm': Failed to parse Letter of Name.
Line 1, Col 109 'm': Failed to parse Name of VarName.
Line 1, Col 109 'm': Failed to parse 'nil' of NilLiteral.
Line 1, Col 109 'm': Failed to parse Text of BoolLiteral.
Line 1, Col 109 'm': Failed to parse '0'...'9' of Digit.
Line 1, Col 109 'm': Failed to parse (Digit)+ of FloatNumber.
Line 1, Col 109 'm': Failed to parse Name of VariableArg.
Line 1, Col 109 'm': Failed to parse firstTerm of OperatorExpr.
Line 1, Col 109 'm': Failed to parse Expr of ExprStmt.
Line 1, Col 109 'm': Failed to parse Letter of Name.
Line 1, Col 109 'm': Failed to parse Name of VarName.
Line 1, Col 109 'm': Failed to parse 'nil' of NilLiteral.
Line 1, Col 109 'm': Failed to parse Text of BoolLiteral.
Line 1, Col 109 'm': Failed to parse '0'...'9' of Digit.
Line 1, Col 109 'm': Failed to parse (Digit)+ of FloatNumber.
Line 1, Col 109 'm': Failed to parse Name of VariableArg.
Line 1, Col 109 'm': Failed to parse firstTerm of OperatorExpr.
Line 1, Col 109 'm': Failed to parse Expr of ExprStmt.
Line 1, Col 109 'm': Failed to parse Letter of Name.
Line 1, Col 109 'm': Failed to parse Name of VarName.
Line 1, Col 109 'm': Failed to parse 'nil' of NilLiteral.
Line 1, Col 109 'm': Failed to parse Text of BoolLiteral.
Line 1, Col 109 'm': Failed to parse '0'...'9' of Digit.
Line 1, Col 109 'm': Failed to parse (Digit)+ of FloatNumber.
Line 1, Col 109 'm': Failed to parse Name of VariableArg.
Line 1, Col 109 'm': Failed to parse firstTerm of OperatorExpr.
Line 1, Col 109 'm': Failed to parse Expr of ExprStmt.
Line 1, Col 109 'm': Failed to parse Letter of Name.
Line 1, Col 109 'm': Failed to parse Name of VarName.
Line 1, Col 109 'm': Failed to parse 'nil' of NilLiteral.
Line 1, Col 109 'm': Failed to parse Text of BoolLiteral.
Line 1, Col 109 'm': Failed to parse '0'...'9' of Digit.
Line 1, Col 109 'm': Failed to parse (Digit)+ of FloatNumber.
Line 1, Col 109 'm': Failed to parse Name of VariableArg.
Line 1, Col 109 'm': Failed to parse firstTerm of OperatorExpr.
Line 1, Col 109 'm': Failed to parse Expr of ExprStmt.
Line 1, Col 1849 '=': Failed to parse Letter of Name.
Line 1, Col 1849 '=': Failed to parse Name of VarName.
Line 1, Col 1849 '=': Failed to parse 'nil' of NilLiteral.
Line 1, Col 1849 '=': Failed to parse Text of BoolLiteral.
Line 1, Col 1849 '=': Failed to parse '0'...'9' of Digit.
Line 1, Col 1849 '=': Failed to parse (Digit)+ of FloatNumber.
Line 1, Col 1849 '=': Failed to parse Name of VariableArg.
Line 1, Col 1849 '=': Failed to parse firstTerm of OperatorExpr.
Line 1, Col 1849 '=': Failed to parse Expr of ExprStmt.
Line 1, Col 1849 '=': Failed to parse remaining input.
'
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:219)
PixelCrushers.DialogueSystem.Lua:Run(String, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter/Lua.cs:120)
PixelCrushers.DialogueSystem.Lua:Run(String, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter/Lua.cs:130)
PixelCrushers.DialogueSystem.PersistentDataManager:ApplySaveData(String, DatabaseResetOptions) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Save System/PersistentDataManager.cs:236)
SaveController:Load() (at Assets/Scripts/Core/Services/SaveController.cs:107)
GameController:StartGame() (at Assets/Scripts/Core/Services/GameController.cs:47)