Cannot Assign To A Null Value

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Timeslip
Posts: 39
Joined: Fri Apr 05, 2019 6:31 am

Cannot Assign To A Null Value

Post by Timeslip »

Hi Tony,

Is this the result of deleting a variable in the database? Using easy save 3 as the save system. If so, is there a way to tell what the missing variable is, or a workaround?

Code: Select all

HighestTactics=0, HighestMedicine=0, HighestPreVirusCivilization=0, HighestDiplomacy=0, HighestIntimidation=30, HighestTrade=0, HighestLockpicking=0, HighestSneaking=0, HighestHacking=0, HighestSoftwareEngineering=0, HighestChemistry=0, HighestMechanics=0, HightestLeadership=0, SunnyPinesIntroDialoguePlayed=true, DragInhabitantsIncapacitated=0, TheDragIncapacitationsRequired=16, TheDragZekeKilled=false, TheDragWinchGateBypassAttempted=false, TheDragWinchActivated=false, TheDragFishProcessingAreaCharactersIncapacitated=0, TheDragFishProcessingAreaCharacterIncapacitationsRequired=4, TheDragCaraSaved=false, TheDragOutbreakSolved=false, SpokeToWoundedFishermanA=false, SpokeToTiberInTheDrag=false, TheDragOutbreakSource=0, TheDragIsThisTheOutbreakSource=false, HighestLeadership=0, SunnyPinesDrecklerTiberOverhead1=false, TheDragProcessingAreaEnemiesKO=false, Actor="Player", Conversant="Lunatic A", ActorIndex="Player", ConversantIndex="Lunatic_A", HighestResolve6=3, ProtagonistSex=0, ProtagonistBoyGirlPronounLower="", HighestEngineering=0, TheDragSpokeToTiberOnHisArrival=false, TheDragAvoidedDocksEncounter=false, TheDragSpokeToHans=false, TheDragSniperDoorOpened=false, TheDragOutbreakSourceKnown=false, TheDragOutbreakSourceReported=false, TheDragOutbreakSolutionReported=false}; Item["Rural_Hysteria"].State="active"; Item["Rural_Hysteria"].Track=true; Item["Rural_Hysteria"].Entry_1_State="active"; Item["Rural_Hysteria"].Entry_2_State="unassigned"; Item["A_Cure_For_Madness"].State="unassigned"; Item["Grain_Shipment"].State="unassigned"; Actor={Player={Name="Player", Pictures="[]", Description="", IsPlayer=true, Display_Name=""}, Lunatic_A={Name="Lunatic A", Pictures="[]", Description="", IsPlayer=false, Display_Name=""}, Lunatic_B={Name="Lunatic B", Pictures="[]", Description="", IsPlayer=false}, Zeke_Haines={Name="Zeke Haines", Pictures="[]", Description="", IsPlayer=false}, WoundedFisherman={Name="WoundedFisherman", Pictures="[]", Description="", IsPlayer=false}, Markus_Tiber={Name="Markus Tiber", Pictures="[]", Description="", IsPlayer=false}, Eliza_Dreckler={Name="Eliza Dreckler", Pictures="[]", Description="", IsPlayer=false}, Unseen_Female={Name="Unseen Female", Pictures="[]", Description="", IsPlayer=false}, Unseen_Male={Name="Unseen Male", Pictures="[]", Description="", IsPlayer=false}, SPGateMilitia={Name="SPGateMilitia", Pictures="[]", Description="", IsPlayer=false}, Cara_Waters={Name="Cara Waters", Pictures="[]", Description="", IsPlayer=false}, Tom_Quint={Name="Tom Quint", Pictures="[]", Description="", IsPlayer=false}, Mike_Quint={Name="Mike Quint", Pictures="[]", Description="", IsPlayer=false}}; Conversation[1].SimX=""; Conversation[2].SimX=""; Conversation[5].SimX=""; Conversation[4].SimX=""; Conversation[6].SimX=""; Conversation[8].SimX=""; Conversation[9].SimX=""; Conversation[10].SimX=""; Conversation[11].SimX=""; Conversation[12].SimX=""; Conversation[13].SimX=""; Conversation[14].SimX=""; Conversation[15].SimX=""; Conversation[16].SimX=""; Conversation[17].SimX=""; Conversation[18].SimX=""; Conversation[20].SimX=""; Conversation[21].SimX=""; Conversation[22].SimX=""; Conversation[23].SimX=""; Conversation[24].SimX=""; Conversation[25].SimX=""; Conversation[26].SimX=""; 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: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)
LoadSaveManager:LoadDialogueSystemData(ES3File) (at Assets/Scripts/Save & Load Scripts/LoadSaveManager.cs:2183)
Last edited by Timeslip on Mon Nov 02, 2020 10:33 am, edited 1 time in total.
User avatar
Tony Li
Posts: 20731
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cannot Assign To A Null Value

Post by Tony Li »

Hi,

No, you can delete variables. Did you delete a conversation that had ID 26 perhaps? (That should be fine, but I'm trying to narrow down the possibilities from the snippet you provided.)
Timeslip
Posts: 39
Joined: Fri Apr 05, 2019 6:31 am

Re: Cannot Assign To A Null Value

Post by Timeslip »

I've restored the entire debug info. I did delete a conversation or two over the weekend.
User avatar
Tony Li
Posts: 20731
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cannot Assign To A Null Value

Post by Tony Li »

That may be a bug. I'll investigate and reply back today.
Timeslip
Posts: 39
Joined: Fri Apr 05, 2019 6:31 am

Re: Cannot Assign To A Null Value

Post by Timeslip »

Thanks. I should let you know that it's an older version (2.1.8) with some custom scripts you sent. If you think updating will resolve, happy to do so.
User avatar
Tony Li
Posts: 20731
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cannot Assign To A Null Value

Post by Tony Li »

I confirmed that it's a bug with SimStatus and deleted conversations. I'll post a patch here by tomorrow morning.
User avatar
Tony Li
Posts: 20731
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cannot Assign To A Null Value

Post by Tony Li »

Hi,

Here's the patch:

DS_SimStatusSaveLoadPatch_2020-11-02.unitypackage

It will be in the next Dialogue System release, too.

To install the patch:

1. Back up your project.
2. Import the patch.
3. If there are any compile errors, update to DS version 2.2.12, then reimport the patch.
Timeslip
Posts: 39
Joined: Fri Apr 05, 2019 6:31 am

Re: Cannot Assign To A Null Value

Post by Timeslip »

Hi Tony,

Thanks, and apologies for the delay in getting back to you. The patch appears to have worked. I say appears because there is a separate issue with the save data which is preventing loading at present, but the original issue is no longer throwing any errors.
User avatar
Tony Li
Posts: 20731
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cannot Assign To A Null Value

Post by Tony Li »

Glad to help! The new version 2.2.13, with the same update as in the patch, is now live on the Asset Store, too.
Post Reply