安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题
If you give me a way to reproduce the issue, i will have a look.
And without a full log I dont even know which mod or RW version you are using...
Mod pack at https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/stats/3507289931
Note I already dropped Priority Treatment as it's a live mod pack so no more of these errors, so very likely something is up with PT
Exception in CheckCurrentToilEndOrFail for pawn Alyona driver=JobDriver_TendPatient (toilIndex=3)
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
if medicine is null from FindBestMedicine(pawn, sickPawn, useOnlyInventory=false) my priority treatment creates a job without the medicine argument.
JobMaker.MakeJob(JobDefOf.TendPatient, sickPawn); //no medicine passed
Perhaps the toil has to do with missing that argument?
Of course, when I run in a simple environment w/ just your and my mods (and a few other cores) I can't reproduce.
If the first hediff in vanilla gets tended without medicine, all following hediffs tended during the treatment get tended without medicine as well.
So I had to interrupt that. Thats what the postfix is doing.
Eventually there is a better way, but just doing a postfix was easier than doing a transpiler... But I will have another look.
But since it is not reproducible with PT and CYM, the cause is most likely another mod?
Doesnt the following mean the index was out of range in "ChooseYourMedicine.Utility_GetList.GetTheCorrectMedicalCareCategory" ?
Exception in CheckCurrentToilEndOrFail for pawn Alyona driver=JobDriver_TendPatient (toilIndex=3)
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
[Ref 2427D69C]
at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <eae584ce26bc40229c1b1aa476bfa589>:0
at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
at ChooseYourMedicine.Utility_GetList.GetTheCorrectMedicalCareCategory (Verse.Pawn patient) [0x000bb] in <968e7ca299844c77acc981c94d990af2>:0 #
...
I have two methods with that name that have different parameters:
One is "GetTheCorrectMedicalCareCategory(Pawn patient, out bool useDetailed)"
the other is "GetTheCorrectMedicalCareCategory(Pawn patient, Hediff firstTendedHediff, out bool useDetailed)"
The method in the stacktrace has only one parameter, so it is the first one that causes the issue? Because the out parameter is somehow ignored?
The method loops through all hediffs and adds the tendable ones to a list, then sorts them by priority, then calls the method with the same name with the parameter listOfTendableHediffs[0].
If there is no tendable hediffs, then the list is empty and we get indexOutOfRange.
I mean... The method should never have been called if there is no tendable hediffs...
I checked the toils postfix again and as long as PriorityTreatment does not add new toils to the job TendPatient, then it should not cause issues.
I will update asap and fix the possible issue mentioned above, but besides that I dont know what may cause the errors.
If it is not fixed, I guess we have to wait for a way to reproduce the issue...