Hi,
From the error i can see that 'convert string to int' has an issue.
So the string somehow has data that is not an int value (for example 13a, a123, /124, '1234", 12.11)
Anything included in the string that is not a whole number will give this error.
so if you are using build string or string split, its probably there that some thing goes wrong.
Try testing with some breakpoints and also look to the string variable that supposed to be converted to an int.