Forum rules - please read before posting.

[SOLVED] NullReferenceException when loading

edited March 2018 in Technical Q&A
Edit: A PM global variable was missing and it was linked to a AC global variable. That was the issue. I don't know how to delete this topic. You could do it if you want. Thank you.

Hi there,

I'd need some assistance in troubleshooting a game-breaking issue with the Save System.

Every time I try to load a (just created) savegame, I get the error attached at the end of this post.

This condition has appeared recently, but I can't pinpoint what I've changed for this to happen. However, the problem seems to be related to Global Variables not uploading correctly.

I have PlayMaker 1.8.4f5 installed along with AC 1.60.7.

What should I do to try to fix this?

That is... if the problem comes from a specific PlayMaker global variable not being read correctly, I'd like to know which one it is.

Thank you.

NullReferenceException: Object reference not set to an instance of an object
AC.PlayMakerIntegration.SetGlobalString (System.String _name, System.String _val) (at Assets/AdventureCreator/Scripts/Static/PlayMakerIntegration.cs:196)
AC.GVar.Upload () (at Assets/AdventureCreator/Scripts/Variables/GVar.cs:227)
AC.GlobalVariables.UploadAll () (at Assets/AdventureCreator/Scripts/Static/GlobalVariables.cs:68)
AC.SaveSystem.AssignVariables (System.String runtimeVariablesData, Boolean fromOptions) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:1598)
AC.SaveSystem.ReturnMainData () (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:1297)
AC.SaveSystem._OnLevelWasLoaded () (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:582)
AC.SaveSystem.ReceiveDataToLoad (AC.SaveFile saveFile, System.String saveFileContents) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:485)
AC.SaveFileHandler_SystemFile.Load (AC.SaveFile saveFile, Boolean doLog) (at Assets/AdventureCreator/Scripts/Save system/FileHandling/SaveFileHandler_SystemFile.cs:124)
AC.SaveSystem.LoadSaveGame (AC.SaveFile saveFile) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:415)
AC.SaveSystem.LoadGame (Int32 elementSlot, Int32 saveID, Boolean useSaveID) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:340)
AC.MenuSavesList.ProcessClick (AC.Menu _menu, Int32 _slot, MouseState _mouseState) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuSavesList.cs:668)
AC.PlayerMenus.CheckClick (AC.Menu _menu, AC.MenuElement _element, Int32 _slot, MouseState _mouseState) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:2135)
AC.PlayerMenus.CheckClicks (AC.Menu menu) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:1830)
AC.PlayerMenus.CheckForInput () (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:1912)
AC.StateHandler.Update () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:343)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.