public void ParseChoice() { int index = -1; if (choice.Contains(":")) { string[] commands = choice.Split(':'); for (int i = 0; i < commands.Length; i++) { string command = commands[i].Split(',')[0]; string mod = commands[i].Split(',')[1]; if (command == "line") { index = int.Parse(mod); } EnterCommand(command, mod); } if (index == -1) { index = manager.lineNum + 2; } } else { string command = choice.Split(',')[0]; string mod = choice.Split(',')[1]; if (command != "line") { index = manager.lineNum + 2; } else { index = int.Parse(mod); } EnterCommand(command, mod); } parser.AddLine(index, "PlayerLine;" + nextLine); manager.playerTalking = false; manager.lineNum++; manager.ShowDialogue(); manager.lineNum++; }