Forum rules - please read before posting.

1.40 bug when changing scenes

I am getting these errors when i change scenes in runtime.
i tried replacing the scene numbers with scene names but that didn't make any change.
also i have previous scene specific player starts , and i see the onload cutscene not being either - causeing the characters to be placed at the wrong place 


NullReferenceException: Object reference not set to an instance of an object
AC.RuntimeInventory.MatchInteractionsFromItem (System.Collections.Generic.List`1 items, AC.InvItem _item) (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:829)
AC.RuntimeInventory.MatchInteractions () (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:796)
AC.MenuInventoryBox.PopulateList () (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuInventoryBox.cs:378)
AC.MenuInventoryBox.RecalculateSize () (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuInventoryBox.cs:332)
AC.PlayerMenus.ResetInventoryBoxes () (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:1565)
AC.RuntimeInventory.SetNull () (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:96)
AC.RuntimeInventory.OnLevelWasLoaded () (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:69)



NullReferenceException: Object reference not set to an instance of an object
AC.RuntimeInventory.MatchInteractionsFromItem (System.Collections.Generic.List`1 items, AC.InvItem _item) (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:829)
AC.RuntimeInventory.MatchInteractions () (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:796)
AC.MenuInventoryBox.PopulateList () (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuInventoryBox.cs:378)
AC.MenuInventoryBox.RecalculateSize () (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuInventoryBox.cs:332)
AC.PlayerMenus.ResetInventoryBoxes () (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:1565)
AC.RuntimeInventory.RemoveRecipes () (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:741)
AC.SaveSystem.OnLevelWasLoaded () (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:386)

NullReferenceException: Object reference not set to an instance of an object
AC.RuntimeInventory.MatchInteractionsFromItem (System.Collections.Generic.List`1 items, AC.InvItem _item) (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:829)
AC.RuntimeInventory.MatchInteractions () (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:796)
AC.MenuInventoryBox.PopulateList () (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuInventoryBox.cs:378)
AC.MenuInventoryBox.RecalculateSize () (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuInventoryBox.cs:332)
AC.PlayerMenus.ResetInventoryBoxes () (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:1565)
AC.RuntimeInventory.RemoveRecipes () (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:741)
AC.SaveSystem.OnLevelWasLoaded () (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:386)

Comments



  • IndexOutOfRangeException: Array index is out of range.
    AC.RememberHotspot.StringToButtonStates (AC.Hotspot hotspot, System.String stateString) (at Assets/AdventureCreator/Scripts/Save system/RememberHotspot.cs:119)
    AC.RememberHotspot.LoadData (AC.HotspotData data) (at Assets/AdventureCreator/Scripts/Save system/RememberHotspot.cs:79)
    AC.LevelStorage.UnloadHotspotData (System.Collections.Generic.List`1 _hotspots) (at Assets/AdventureCreator/Scripts/Save system/LevelStorage.cs:364)
    AC.LevelStorage.ReturnCurrentLevelData () (at Assets/AdventureCreator/Scripts/Save system/LevelStorage.cs:66)
    AC.SceneSettings.Start () (at Assets/AdventureCreator/Scripts/Game engine/SceneSettings.cs:70)

  • That last error is likely because you're restoring a saved game from a previous version.  Save games made before 1.40 will not be compatible when 1.40.
  • edited November 2014
    @ChrisIceBox
    About the save games, I have issue from when I updated to 1.40. I deleted all *.save and started from scratch. Click on "New save", it save the game correctly. When I click again on "new save" it overwrites the first save I made... there are only 1 save possible, also tried with the demo menu manager.
  • And I noticed when I load the savegame, after load remains the load menu screen (before the update, after load a previous saved game, all menu disappear and game start).
  • I have not actually loaded a saved game. in fact, now i went and deleted all the save games and i still see this.

    the last error happens when you go back and forth changing scenes more than once

    i'm going to try the package you sent me.
  • the first error dissapeared, the second is still there (and causing the scene not to start properly.)



    IndexOutOfRangeException: Array index is out of range.
    AC.RememberHotspot.StringToButtonStates (AC.Hotspot hotspot, System.String stateString) (at Assets/AdventureCreator/Scripts/Save system/RememberHotspot.cs:119)
    AC.RememberHotspot.LoadData (AC.HotspotData data) (at Assets/AdventureCreator/Scripts/Save system/RememberHotspot.cs:79)
    AC.LevelStorage.UnloadHotspotData (System.Collections.Generic.List`1 _hotspots) (at Assets/AdventureCreator/Scripts/Save system/LevelStorage.cs:364)
    AC.LevelStorage.ReturnCurrentLevelData () (at Assets/AdventureCreator/Scripts/Save system/LevelStorage.cs:66)
    AC.SceneSettings.Start () (at Assets/AdventureCreator/Scripts/Game engine/SceneSettings.cs:70)


    I'm actually suspecting it has to do with Dialogue manager loading the game's state or something because i also see these when i change scenes:

    Dialogue System: Updating Lua environment with saved data.
    UnityEngine.Debug:Log(Object)
    PixelCrushers.DialogueSystem.PersistentDataManager:ApplySaveData(String, DatabaseResetOptions)
    PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge:LoadDialogueSystemFromGlobalVariable() (at Assets/Dialogue System/Third Party Support/Adventure Creator/Scripts/AdventureCreatorBridge.cs:429)
    AC.SaveSystem:OnLevelWasLoaded() (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:409)


    Dialogue System: Applying persistent data from Lua environment.
    UnityEngine.Debug:Log(Object)
    PixelCrushers.DialogueSystem.PersistentDataManager:Apply()
    PixelCrushers.DialogueSystem.PersistentDataManager:ApplySaveData(String, DatabaseResetOptions)
    PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge:LoadDialogueSystemFromGlobalVariable() (at Assets/Dialogue System/Third Party Support/Adventure Creator/Scripts/AdventureCreatorBridge.cs:429)
    AC.SaveSystem:OnLevelWasLoaded() (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:409)

  • I'll look into this on the Dialogue System side and reply back here. In the meantime, if you want to entirely eliminate the Dialogue System from the save/load process, comment out the lines you added to Scripts/Menu/MenuSystem.cs and Scripts/Save system/SaveSystem.cs as documented here.

  • @pixelcrushers i marked these two out, and the bug is still there, so it might not be that. 
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.