How to compute all number in the same list

BLOCK:ConstantList
  value = ["10000", "151515151"]
  => VAR @constantListOutput
ENDBLOCK

BLOCK:Compute
  input = $"<constantListOutput[*]> / 100"
  => VAR @computeOutput
ENDBLOCK

How to compute all numbers please :slight_smile: @Ruri

Hey @RaskL
Since no one has answered you for the moment I give you a small solution to help you out.
It is not possible to do what you have tried because quite simply the list is in string and the compute requests an entry in int.

Look :slight_smile:
Capture2

I have paste your code into my Openbullet and i have this error :slight_smile:
Capture3
To be able to solve this error it is therefore necessary to convert the string to the int

in c# it is done like this :
int.Parse();


Here is the lolicode I think there is even faster than that I don’t know enough c# maybe Ruri or other will offer you a better solution

BLOCK:ConstantList
  value = $["10000", "151515151"]
  => VAR @RaskList
ENDBLOCK

int A = int.Parse(RaskList[0]);
int B = int.Parse(RaskList[1]);
int result = A + B ;

BLOCK:Compute
  input = $"<result> / 100"
  => VAR @Final
ENDBLOCK

@RaskL
Capture4

2 Likes

Thanks have a nice day :wink:

1 Like