{"record":{"id":"4ed8629c81343927","repo":"babalae/better-genshin-impact","slug":"round-0-round-1","errorCode":null,"errorMessage":"round方法的入参格式错误，回合数必须大于0，例：round(1)","messagePattern":"round方法的入参格式错误，回合数必须大于0，例：round\\(1\\)","errorType":"validation","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"BetterGenshinImpact/GameTask/AutoFight/Script/CombatScriptParser.cs","lineNumber":190,"sourceCode":"                if (parts.Length != 2) {\n                    Logger.LogError(\"round方法的入参格式错误，例：round(1-3)\");\n                    throw new ArgumentException(\"round方法的入参格式错误，例：round(1-3)\");\n                }\n                var start = int.Parse(parts[0]);\n                var end = int.Parse(parts[1]);\n                if (start > end || start <= 0) {\n                    Logger.LogError(\"round方法的入参格式错误，起始回合必须小于等于结束回合且大于0，例：round(1-3)\");\n                    throw new ArgumentException(\"round方法的入参格式错误，起始回合必须小于等于结束回合且大于0，例：round(1-3)\");\n                }\n                for (int i = start; i <= end; i++) {\n                    activatingRounds.Add(i);\n                }\n            } else {\n                // 单个回合\n                var round = int.Parse(arg);\n                if (round <= 0) {\n                    Logger.LogError(\"round方法的入参格式错误，回合数必须大于0，例：round(1)\");\n                    throw new ArgumentException(\"round方法的入参格式错误，回合数必须大于0，例：round(1)\");\n                }\n                activatingRounds.Add(round);\n            }\n        }\n        return activatingRounds;\n    }\n\n    public static List<CombatCommand> ParseLineCommands(string lineWithoutAvatar, string avatarName) {\n        var parts = lineWithoutAvatar.Split(\"|\", StringSplitOptions.RemoveEmptyEntries);\n        var fullCombatCommands = new List<CombatCommand>();\n        foreach (var part in parts)\n        {\n            var combatCommands = ParseLinePart(part, avatarName);\n            if (combatCommands.Count > 0 && combatCommands[0].Method == Method.Round) {\n                // 遇到round指令，作为回合分隔符使用，不加入最终指令列表\n                var roundCommand = combatCommands[0];\n                var activatingRounds = ParseRoundCommand(roundCommand);\n                combatCommands.RemoveAt(0);","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/GameTask/AutoFight/Script/CombatScriptParser.cs#L172-L208","documentation":"Error \"round方法的入参格式错误，回合数必须大于0，例：round(1)\" thrown in babalae/better-genshin-impact.","triggerScenarios":"round 的单个回合参数解析后<=0（如 round(0)、round(-1)）时抛出。","commonSituations":"回合数写了0或负数。","solutions":["round 的回合数必须大于0，如 round(1)","检查是否误写为 round(0) 或负数"],"exampleFix":"回合数从1开始，使用正整数，如 round(1)。","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}