{"record":{"id":"5438f2af8e17e69a","repo":"babalae/better-genshin-impact","slug":"round-0-round-1-3","errorCode":null,"errorMessage":"round方法的入参格式错误，起始回合必须小于等于结束回合且大于0，例：round(1-3)","messagePattern":"round方法的入参格式错误，起始回合必须小于等于结束回合且大于0，例：round\\(1-3\\)","errorType":"validation","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"BetterGenshinImpact/GameTask/AutoFight/Script/CombatScriptParser.cs","lineNumber":180,"sourceCode":"        // 支持Round(1)、Round(1,3,5)、Round(2-4)、Round(1,3-5)等格式\n        var activatingRounds = new List<int>();\n        if (roundCommand.Args == null || roundCommand.Args.Count == 0) {\n            Logger.LogError(\"round方法必须有入参，代表在哪些回合执行后续指令，例：round(1)、round(1,3-5)\");\n            throw new ArgumentException(\"round方法必须有入参，代表在哪些回合执行后续指令，例：round(1)、round(1,3-5)\");\n        }\n        foreach (var arg in roundCommand.Args) {\n            if (arg.Contains('-')) {\n                // 范围\n                var parts = arg.Split('-', StringSplitOptions.TrimEntries);\n                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) {","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/GameTask/AutoFight/Script/CombatScriptParser.cs#L162-L198","documentation":"Error \"round方法的入参格式错误，起始回合必须小于等于结束回合且大于0，例：round(1-3)\" thrown in babalae/better-genshin-impact.","triggerScenarios":"round 范围参数中起始回合大于结束回合，或起始回合<=0 时抛出。","commonSituations":"写成 round(3-1) 或 round(0-2) 这类非法范围。","solutions":["确保 round 范围起始回合小于等于结束回合且均大于0，如 round(1-3)","修正如 round(3-1) 或 round(0-2) 之类的错误写法"],"exampleFix":"保证起始回合>=1且不大于结束回合，如 round(1-3)。","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"}