export. how to name the indices of array and limit him.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Timofey

For example, I have a variable damage exported from the editor, which is an array where the first number is the minimum damage, and the second is the maximum damage. I need to name the first and second element respectively and limit the array to at most two values.

this code allows you to import an array of numbers from the editor, but I also need to name the elements and limit their number.

export (PoolIntArray) damage := [1, 2]
:bust_in_silhouette: Reply From: exuin

You can’t name indexes of an array, and you can’t set their size either. Maybe you should just have two separate variables.