Maybe there's a reason why this isn't already the case, but it would be pretty useful if all nil strings had a number value of 0 and all non-nil strings had a number value of 1.
Untitled.png
Untitled2.png
Use case might be to check the number of non-nil strings in a line, so you could, for example use:
I don't think this will be possible for 2 reasons.
First, when measure values are retrieved, strings are preferred over numeric values (in most cases). If we automatically used "nil" as an indicator of "something", then no numeric values would ever be displayed when a numeric value was specifically asked for. Most of the time, if a string value converts to a number, the number value will also be set.
Second, I think this would have the potential to break a lot of existing skins.
An alternative to Yincognito's solution could be to use a lua script that would send in multiple string values and output the sum of existing number of valid strings.
Cariboudjan wrote: ↑March 24th, 2022, 4:08 pm[...] Use case might be to check the number of non-nil strings in a line [...]
Brian wrote: ↑March 25th, 2022, 4:53 amAn alternative to Yincognito's solution could be to use a lua script that would send in multiple string values and output the sum of existing number of valid strings.