Hi i try to do two simple checks:
//EVENTS VARIABLES
int EventNumber=0;
public List<string> Message;
public float[] waypointXValue;
public float[] waypointWaitingTime;
public string[] waypointAnimation;
if( <check array not out of range> || Message[EventNumber] != "")
{
// enter in this only if Message.length<EventNumber and Message[EventNumber] is not empty
}
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[System.String].get_Item (Int32 index)
NPCControlTrigger+<EventManager>c__Iterator15.MoveNext () (at Assets/GameContent/PostcompileScripts/Trigger/NPCControlTrigger.cs:61)
UnityEngine.MonoBehaviour:StartCoroutine(String)
NPCControlTrigger:Move() (at Assets/GameContent/PostcompileScripts/Trigger/NPCControlTrigger.cs:91)
NPCControlTrigger:Update() (at Assets/GameContent/PostcompileScripts/Trigger/NPCControlTrigger.cs:117)
How to check this properly?