+1
Fixed

Toggle Active state action raise error

Mad Stuntman 5 months ago in Game Creator updated by Marti (Lead Developer) 5 months ago 6 1 duplicate

Toggle Active state action which was introduced in 1.1.7 isn't work as intended and raise error:

FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.



Bad thing it collapses Actions panel making all other actions unaccesible.

Unity version:
Any
Game Creator version:
1.1.7

Answer

Answer
Fixed

Hi everyone, I identified the issue and fixed it. I'll push an update today and tomorrow should be available. If you encounter any further issues after updating, feel free to reopen this thread.

Duplicates 1

I get same error and posted about it 2 minutes later than you :)

Under review

That's the whole message? Doesn't say anything about tracelog. When this happens, it's usually a Unity bug (the cursed 2019.3). However, if this only happens using this Action, it may be something else.

Can you explain a bit more what are you doing? Are you referencing only scene objects? Does this happen always? Only when in playmode, ...?

I used both 2019.3 and 2020.1b and got the same error even in the clean scene in newly created project.
I just adding that action into the Actions panel and immediately get an error after click on Toggle Active (screenshot below)



Full trace:
FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
System.Text.StringBuilder.AppendFormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.String.FormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.String.Format (System.String format, System.Object arg0) (at <437ba245d8404784b9fbab9b439ac908>:0)
GameCreator.Core.ActionToggleActive.GetNodeTitle () (at Assets/Plugins/GameCreator/Core/Mono/Actions/Objects/ActionToggleActive.cs:46)
GameCreator.Core.IActionsListEditor.PaintActionHeader (System.Int32 i) (at Assets/Plugins/GameCreator/Core/Editor/Interaction/IActionsListEditor.cs:275)
GameCreator.Core.IActionsListEditor.OnInspectorGUI () (at Assets/Plugins/GameCreator/Core/Editor/Interaction/IActionsListEditor.cs:89)
GameCreator.Core.ActionsEditor.OnInspectorGUI () (at Assets/Plugins/GameCreator/Core/Editor/Interaction/ActionsEditor.cs:72)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass55_0.b__0 () (at <17b72532ee2c4da1b6f632d3f1705fe0>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)


If it could help... Same error in 2018.4.22f1 LTS
FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
System.Text.StringBuilder.AppendFormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) (at :0)
System.String.FormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) (at :0)
System.String.Format (System.String format, System.Object arg0) (at :0)
GameCreator.Core.ActionToggleActive.GetNodeTitle () (at Assets/Plugins/GameCreator/Core/Mono/Actions/Objects/ActionToggleActive.cs:46)
GameCreator.Core.IActionsListEditor.PaintActionHeader (System.Int32 i) (at Assets/Plugins/GameCreator/Core/Editor/Interaction/IActionsListEditor.cs:275)
GameCreator.Core.IActionsListEditor.OnInspectorGUI () (at Assets/Plugins/GameCreator/Core/Editor/Interaction/IActionsListEditor.cs:89)
GameCreator.Core.ActionsEditor.OnInspectorGUI () (at Assets/Plugins/GameCreator/Core/Editor/Interaction/ActionsEditor.cs:72)
UnityEditor.InspectorWindow.DoOnInspectorGUI (System.Boolean rebuildOptimizedGUIBlock, UnityEditor.Editor editor, System.Boolean wasVisible, UnityEngine.Rect& contentRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1647)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

Answer
Fixed

Hi everyone, I identified the issue and fixed it. I'll push an update today and tomorrow should be available. If you encounter any further issues after updating, feel free to reopen this thread.