0
Not a bug

stats bug

Dino Tobagin 4 months ago in Stats updated by Marti (Lead Developer) 4 months ago 1



Using the example stats from the stat module, I've created a new formula to display the exp needed to pass the level I set max tier to 60. but for someone reason I add more experience than the limit it accepts and throws the following error:

Exception: Unexpected character: I
GameCreator.Core.Math.Tokenizer.NextToken () (at Assets/Plugins/GameCreator/Core/Mono/Utilities/Math/Library/Tokenizer.cs:115)
GameCreator.Core.Math.Tokenizer..ctor (System.String expression) (at Assets/Plugins/GameCreator/Core/Mono/Utilities/Math/Library/Tokenizer.cs:48)
GameCreator.Core.Math.Parser..ctor (System.String expression) (at Assets/Plugins/GameCreator/Core/Mono/Utilities/Math/Library/Parser.cs:13)
GameCreator.Core.Math.Expression.Evaluate (System.String expression) (at Assets/Plugins/GameCreator/Core/Mono/Utilities/Math/Math.cs:7)
GameCreator.Core.ExpressionEvaluator.Evaluate (System.String expression) (at Assets/Plugins/GameCreator/Core/Mono/Utilities/ExpressionEvaluator.cs:9)
GameCreator.Stats.Formula.Calculate (System.Single value, GameCreator.Stats.Stats origin, GameCreator.Stats.Stats target) (at Assets/Plugins/GameCreator/Stats/Mono/Classes/Formula.cs:379)
GameCreator.Stats.Stats.GetStat (System.String stat, GameCreator.Stats.Stats target) (at Assets/Plugins/GameCreator/Stats/Mono/Components/Stats.cs:270)
GameCreator.Stats.StatUI.UpdateStatUI (GameCreator.Stats.Stats+EventArgs args) (at Assets/Plugins/GameCreator/Stats/Mono/Components/StatUI.cs:85)
GameCreator.Stats.Stats.AddStatBase (System.String stat, System.Single value, System.Boolean informCallbacks) (at Assets/Plugins/GameCreator/Stats/Mono/Components/Stats.cs:364)
GameCreator.Stats.ActionChangeStat.InstantExecute (UnityEngine.GameObject target, GameCreator.Core.IAction[] actions, System.Int32 index) (at Assets/Plugins/GameCreator/Stats/Mono/Actions/ActionChangeStat.cs:71)
GameCreator.Core.IAction.InstantExecute (UnityEngine.GameObject target, GameCreator.Core.IAction[] actions, System.Int32 index, System.Object[] parameters) (at Assets/Plugins/GameCreator/Core/ScriptableObjects/Interaction/IAction.cs:21)
GameCreator.Core.IActionsList+d__9.MoveNext () (at Assets/Plugins/GameCreator/Core/ScriptableObjects/Interaction/IActionsList.cs:107)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at /Users/builduser/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
GameCreator.Core.IActionsList:Execute(GameObject, Action, Object[]) (at Assets/Plugins/GameCreator/Core/ScriptableObjects/Interaction/IActionsList.cs:91)
GameCreator.Core.Actions:Execute(GameObject, Object[]) (at Assets/Plugins/GameCreator/Core/Mono/Interaction/Actions.cs:96)
GameCreator.Core.Actions:ExecuteWithTarget(GameObject) (at Assets/Plugins/GameCreator/Core/Mono/Interaction/Actions.cs:111)
UnityEngine.Events.UnityEvent`1:Invoke(GameObject)
GameCreator.Core.ButtonActions:Press() (at Assets/Plugins/GameCreator/Core/Mono/UI/ButtonActions.cs:99)
GameCreator.Core.ButtonActions:OnPointerClick(PointerEventData) (at Assets/Plugins/GameCreator/Core/Mono/UI/ButtonActions.cs:68)
UnityEngine.EventSystems.EventSystem:Update() (at /Applications/Unity/Hub/Editor/2019.3.13f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)


Unity version:
2019.3.13f1
Game Creator version:
1.1.8
GOOD, I'M SATISFIED

It was that indeed! Thanks Marti as always quick to respond!

Satisfaction mark by Dino Tobagin 4 months ago
Not a bug

The error isn't very informative, but this usually happens when the Formula contains an invalid symbol. Check out that the spelling of all formula symbols are correct