Error when trying to change Player name in actor field
Posted: Tue Jan 30, 2024 11:53 am
Hello,
I have an error when I try to change the Player name.
I use the following line of code in my script when the player enter his own name with an InputField:
I have the following error :
I tried updating Dialogue system with lastest version (2.2.42).
Thank you in advance if you can help me with this.
I have an error when I try to change the Player name.
I use the following line of code in my script when the player enter his own name with an InputField:
I also tried with the "Display Name"DialogueLua.SetActorField("Player", "Name", enteredName);
I have the following error :
I'm not really sure what caused this or if I did something wrong. :/NullReferenceException: Table not found in Lua environment: Actor
PixelCrushers.DialogueSystem.DialogueLua.SetTableField (System.String table, System.String element, System.String field, System.Object value) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/DB/DialogueLua.cs:1022)
PixelCrushers.DialogueSystem.DialogueLua.SetActorField (System.String actor, System.String field, System.Object value) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/DB/DialogueLua.cs:1045)
PlayerName.ValidateChoices () (at Assets/MyGame/Scripts/CharacterSheet/PlayerName.cs:64)
UnityEngine.Events.InvokableCall.Invoke () (at <88f69663e9a64d00b2091dd8dfd4d38f>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <88f69663e9a64d00b2091dd8dfd4d38f>:0)
UnityEngine.UI.Button.Press () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:68)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:110)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:50)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:262)
UnityEngine.EventSystems.EventSystem:Update() (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:385)
I tried updating Dialogue system with lastest version (2.2.42).
Thank you in advance if you can help me with this.