Forum rules - please read before posting.

Question about Tutorial 'Creating a "You have found an item" window'

I have followed this tutorial https://adventurecreator.org/tutorials/creating-you-have-found-item-window and it successfully displays the texture for the inventory item when it is picked up by the player when testing in the game window but it also displays lots of error messages that I don't know how to fix. Is there perhaps something else that needs to be done that I am missing to avoid these error messages?

I tried to find more information by keeping the menu as specified in the tutorial and deleting the Global event Event "OnInventoryAdd" as in the tutorial. If I delete the Global Events Event "OnInventoryAdd" and keep the Menu NewItem as is then the messages disappear but clearly it doesn't then do anything.

Should I worry about these error messages?

Thank you for adding these new functions and tutorials.

Here is a screenshot of the error messages.

https://imgur.com/a/nd3U034

Comments

  • Do these get grouped up if you click "Collapse" in the Console window?

    I'll need to see the full message that appears - can you copy/paste the error message (stacktrace included) that appears at the bottom when selected?

  • Here is the copy/paste of the stacktrace.

    A custom script is calling 'PlayerMenus.GetElementWithName ()' before the Menus have been initialised - consider adjusting your script's Script Execution Order.

    -> AC debug logger
    UnityEngine.Debug:LogError (object,UnityEngine.Object)
    AC.ACDebug:LogError (object,UnityEngine.Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:46)
    AC.PlayerMenus:GetElementWithName (string,string) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:2821)
    AC.ActionMenuSetInputBox:Run () (at Assets/AdventureCreator/Scripts/Actions/ActionMenuSetInputBox.cs:131)
    AC.ActionList/d__46:MoveNext () (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:467)
    UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
    AC.ActionList:ProcessAction (int) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:408)
    AC.RuntimeActionList:BeginActionList (int,bool) (at Assets/AdventureCreator/Scripts/ActionList/RuntimeActionList.cs:181)
    AC.ActionList:Interact (int,bool) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:279)
    AC.RuntimeActionList:DownloadActions (AC.ActionListAsset,AC.Conversation,int,bool,bool,bool) (at Assets/AdventureCreator/Scripts/ActionList/RuntimeActionList.cs:136)
    AC.AdvGame:RunActionListAsset (AC.ActionListAsset,AC.Conversation,int,bool,bool) (at Assets/AdventureCreator/Scripts/Static/AdvGame.cs:242)
    AC.AdvGame:RunActionListAsset (AC.ActionListAsset,int,int) (at Assets/AdventureCreator/Scripts/Static/AdvGame.cs:163)
    AC.ActionListAsset:Interact () (at Assets/AdventureCreator/Scripts/ActionList/ActionListAsset.cs:527)
    AC.EventBase:Run (object[]) (at Assets/AdventureCreator/Scripts/Events/EventBase.cs:125)
    AC.EventInventoryAddRemove:OnInventoryAdd (AC.InvCollection,AC.InvInstance,int) (at Assets/AdventureCreator/Scripts/Events/Events/EventInventoryAddRemove.cs:37)
    AC.EventManager:Call_OnChangeInventory (AC.InvCollection,AC.InvInstance,AC.InventoryEventType,int) (at Assets/AdventureCreator/Scripts/Managers/EventManager.cs:1673)
    AC.InvCollection:Insert (AC.InvInstance,int,AC.OccupiedSlotBehaviour,bool) (at Assets/AdventureCreator/Scripts/Inventory/InvCollection.cs:618)
    AC.InvCollection:AddToEnd (AC.InvInstance) (at Assets/AdventureCreator/Scripts/Inventory/InvCollection.cs:421)
    AC.InvCollection:.ctor (System.Collections.Generic.List`1<AC.InvItem>) (at Assets/AdventureCreator/Scripts/Inventory/InvCollection.cs:75)
    AC.RuntimeInventory:GetItemsOnStart (int) (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:1309)
    AC.RuntimeInventory:AssignStartingItems () (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:1251)
    AC.RuntimeInventory:OnInitPersistentEngine () (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:97)
    AC.StateHandler:Initialise (bool) (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:107)
    AC.KickStarter:SetPersistentEngine () (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:178)
    AC.KickStarter:Initialise () (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:1103)
    AC.MultiSceneChecker:Awake () (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:45)

    Unity 2022.3.5f1
    AC v1.78.1 (same with AC v1.78)

  • Stacktrace from second message:-

    A custom script is calling 'PlayerMenus.GetElementWithName ()' before the Menus have been initialised - consider adjusting your script's Script Execution Order.

    -> AC debug logger
    UnityEngine.Debug:LogError (object,UnityEngine.Object)
    AC.ACDebug:LogError (object,UnityEngine.Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:46)
    AC.PlayerMenus:GetElementWithName (string,string) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:2821)
    AC.ActionMenuSetInputBox:Run () (at Assets/AdventureCreator/Scripts/Actions/ActionMenuSetInputBox.cs:131)
    AC.ActionList/d__46:MoveNext () (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:467)
    UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
    AC.ActionList:ProcessAction (int) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:408)
    AC.ActionList:ProcessActionEnd (AC.ActionEnd,int,bool) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:606)
    AC.ActionList:EndAction (AC.Action) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:575)
    AC.ActionList/d__46:MoveNext () (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:539)
    UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
    AC.ActionList:ProcessAction (int) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:408)
    AC.RuntimeActionList:BeginActionList (int,bool) (at Assets/AdventureCreator/Scripts/ActionList/RuntimeActionList.cs:181)
    AC.ActionList:Interact (int,bool) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:279)
    AC.RuntimeActionList:DownloadActions (AC.ActionListAsset,AC.Conversation,int,bool,bool,bool) (at Assets/AdventureCreator/Scripts/ActionList/RuntimeActionList.cs:136)
    AC.AdvGame:RunActionListAsset (AC.ActionListAsset,AC.Conversation,int,bool,bool) (at Assets/AdventureCreator/Scripts/Static/AdvGame.cs:242)
    AC.AdvGame:RunActionListAsset (AC.ActionListAsset,int,int) (at Assets/AdventureCreator/Scripts/Static/AdvGame.cs:163)
    AC.ActionListAsset:Interact () (at Assets/AdventureCreator/Scripts/ActionList/ActionListAsset.cs:527)
    AC.EventBase:Run (object[]) (at Assets/AdventureCreator/Scripts/Events/EventBase.cs:125)
    AC.EventInventoryAddRemove:OnInventoryAdd (AC.InvCollection,AC.InvInstance,int) (at Assets/AdventureCreator/Scripts/Events/Events/EventInventoryAddRemove.cs:37)
    AC.EventManager:Call_OnChangeInventory (AC.InvCollection,AC.InvInstance,AC.InventoryEventType,int) (at Assets/AdventureCreator/Scripts/Managers/EventManager.cs:1673)
    AC.InvCollection:Insert (AC.InvInstance,int,AC.OccupiedSlotBehaviour,bool) (at Assets/AdventureCreator/Scripts/Inventory/InvCollection.cs:618)
    AC.InvCollection:AddToEnd (AC.InvInstance) (at Assets/AdventureCreator/Scripts/Inventory/InvCollection.cs:421)
    AC.InvCollection:.ctor (System.Collections.Generic.List`1<AC.InvItem>) (at Assets/AdventureCreator/Scripts/Inventory/InvCollection.cs:75)
    AC.RuntimeInventory:GetItemsOnStart (int) (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:1309)
    AC.RuntimeInventory:AssignStartingItems () (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:1251)
    AC.RuntimeInventory:OnInitPersistentEngine () (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:97)
    AC.StateHandler:Initialise (bool) (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:107)
    AC.KickStarter:SetPersistentEngine () (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:178)
    AC.KickStarter:Initialise () (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:1103)
    AC.MultiSceneChecker:Awake () (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:45)

  • Stacktrace from third message:-

    A custom script is calling 'PlayerMenus.GetMenuWithName ()' before the Menus have been initialised - consider adjusting your script's Script Execution Order.

    -> AC debug logger
    UnityEngine.Debug:LogError (object,UnityEngine.Object)
    AC.ACDebug:LogError (object,UnityEngine.Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:46)
    AC.PlayerMenus:GetMenuWithName (string) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:2788)
    AC.ActionMenuState:Run () (at Assets/AdventureCreator/Scripts/Actions/ActionMenuState.cs:88)
    AC.ActionList/d__46:MoveNext () (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:467)
    UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
    AC.ActionList:ProcessAction (int) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:408)
    AC.ActionList:ProcessActionEnd (AC.ActionEnd,int,bool) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:606)
    AC.ActionList:EndAction (AC.Action) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:575)
    AC.ActionList/d__46:MoveNext () (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:539)
    UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
    AC.ActionList:ProcessAction (int) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:408)
    AC.ActionList:ProcessActionEnd (AC.ActionEnd,int,bool) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:606)
    AC.ActionList:EndAction (AC.Action) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:575)
    AC.ActionList/d__46:MoveNext () (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:539)
    UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
    AC.ActionList:ProcessAction (int) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:408)
    AC.RuntimeActionList:BeginActionList (int,bool) (at Assets/AdventureCreator/Scripts/ActionList/RuntimeActionList.cs:181)
    AC.ActionList:Interact (int,bool) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:279)
    AC.RuntimeActionList:DownloadActions (AC.ActionListAsset,AC.Conversation,int,bool,bool,bool) (at Assets/AdventureCreator/Scripts/ActionList/RuntimeActionList.cs:136)
    AC.AdvGame:RunActionListAsset (AC.ActionListAsset,AC.Conversation,int,bool,bool) (at Assets/AdventureCreator/Scripts/Static/AdvGame.cs:242)
    AC.AdvGame:RunActionListAsset (AC.ActionListAsset,int,int) (at Assets/AdventureCreator/Scripts/Static/AdvGame.cs:163)
    AC.ActionListAsset:Interact () (at Assets/AdventureCreator/Scripts/ActionList/ActionListAsset.cs:527)
    AC.EventBase:Run (object[]) (at Assets/AdventureCreator/Scripts/Events/EventBase.cs:125)
    AC.EventInventoryAddRemove:OnInventoryAdd (AC.InvCollection,AC.InvInstance,int) (at Assets/AdventureCreator/Scripts/Events/Events/EventInventoryAddRemove.cs:37)
    AC.EventManager:Call_OnChangeInventory (AC.InvCollection,AC.InvInstance,AC.InventoryEventType,int) (at Assets/AdventureCreator/Scripts/Managers/EventManager.cs:1673)
    AC.InvCollection:Insert (AC.InvInstance,int,AC.OccupiedSlotBehaviour,bool) (at Assets/AdventureCreator/Scripts/Inventory/InvCollection.cs:618)
    AC.InvCollection:AddToEnd (AC.InvInstance) (at Assets/AdventureCreator/Scripts/Inventory/InvCollection.cs:421)
    AC.InvCollection:.ctor (System.Collections.Generic.List`1<AC.InvItem>) (at Assets/AdventureCreator/Scripts/Inventory/InvCollection.cs:75)
    AC.RuntimeInventory:GetItemsOnStart (int) (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:1309)
    AC.RuntimeInventory:AssignStartingItems () (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:1251)
    AC.RuntimeInventory:OnInitPersistentEngine () (at Assets/AdventureCreator/Scripts/Inventory/RuntimeInventory.cs:97)
    AC.StateHandler:Initialise (bool) (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:107)
    AC.KickStarter:SetPersistentEngine () (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:178)
    AC.KickStarter:Initialise () (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:1103)
    AC.MultiSceneChecker:Awake () (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:45)

  • Thanks, I'll look into it.

    You should be able to ignore the warnings for now.

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.