Page 1 of 1

ScenEdit_AddCustomLoss displayerror

Posted: Fri May 31, 2024 1:46 am
by gesch80550
I have setup a scenario and would like to track the number of human casualties on both sides to report with the losses. When a unit is destroyed, I have a Lua event that looks up the crew for that unit and adds it to that side's losses - ScenEdit_AddCustomLoss( un.side, {{'Casualties', lost}})). The function seems to work fine; if I use the Lua Console and run a quick script to get the losses, I can see the one that I added
script.png
script.png (14.57 KiB) Viewed 215 times
However, when I try to look at the Losses + Expenditures screen I get an error saying, "Conversion from string 'Causalities' to type 'Double' is not valid."
error.png
error.png (89.95 KiB) Viewed 215 times
Is this an error in the system or am I doing something wrong here?