-
Notifications
You must be signed in to change notification settings - Fork 0
Any
The listutils:any function checks if any element in a list has a non-zero data get value.
Input is given using the listutils:in storage:
| Field | Meaning |
|---|---|
List |
The list to check. |
After defining the input, run the function listutils:any.
Errors that display when executing the listutils:any function as a player in debug mode.
| Error | Message |
|---|---|
| TBD | TBD |
The success of the operation is stored in the $listutils.success listutils.out score. This score is 1 on success and 0 otherwise. The success is 0 when all elements have a data get value of zero.
The result of the operation is stored in the $listutils.result listutils.out score and is equal to the success.
Take the example list ExampleList: ["foo", "Hello World!", "", "bar"] in the listutils:examples storage:
# Add List to the input.
data modify storage listutils:in List set from storage listutils:examples ExampleList
# Call the function.
function listutils:anyThis would return 1 in the $listutils.result listutils.out score.