Hi guys, I have been playing around building a test level in Adventure Creator for a few months now and have just signed up to the forums. I'm using player switching and have this issue come up, I can't find the reference anywhere, anyone with any scripting knowledge able to help out?:
NullReferenceException: Object reference not set to an instance of an object
System.Int32.ToString () (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System/Int32.cs:672)
AC.SaveSystem.CreateInventoryData (AC.RuntimeInventory runtimeInventory) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:1418)
AC.SaveSystem.SavePlayerData (AC.Player player) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:480)
AC.SaveSystem.SaveCurrentPlayerData () (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:460)
ActionPlayerSwitch.Run () (at Assets/AdventureCreator/Scripts/Actions/ActionPlayerSwitch.cs:86)
AC.ActionList+<RunAction>c__Iterator1.MoveNext () (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:194)
UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:164)
AC.<RunAction>c__Iterator1:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:230)
UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:164)
AC.<RunAction>c__Iterator1:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:230)
UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:164)
AC.<RunAction>c__Iterator1:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:230)
UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:164)
AC.<RunAction>c__Iterator1:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:230)
UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:164)
AC.<RunAction>c__Iterator1:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:230)
UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:164)
AC.<RunAction>c__Iterator1:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:230)
UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:164)
AC.<RunAction>c__Iterator1:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:230)
UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:164)
AC.<RunAction>c__Iterator1:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:230)
UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:164)
AC.ActionList:BeginActionList(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:142)
AC.ActionList:Interact() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:111)
AC.<UseObject>c__Iterator6:MoveNext() (at Assets/AdventureCreator/Scripts/Controls/PlayerInteraction.cs:787)
Comments
It's not recommended to edit the demo project beyond testing things, since it'll get overwritten when you update AC.