Error solutions Dart/kotlin

What happens

The bot is showing an error in the compilation of the solution of the exercise in the dart program, however this problem was already tested on the codeabbey page.
In addition to this it shows a solution problem in kotlin that I am not understanding.

What do you understand or find about that problem

I tried to search the forum and although I did find similar problems I did not find a concrete solution

You make any workaround? What did you do?

I have not understood the reason for the errors so, on my own I have not been able to solve the error.

evidences

Pipeline #745996393

I need help with

Understand the reason for the error

Hello,

To begin with, remember that we do not support challenges that use cycles, either FOR or WHILE, and derivatives. I also see that the code is poorly structured, for more information the documentation in this section could guide you:

As for the feedback on this code, as the error in the pipeline says, there is a variable that is not being used.
imagen

If you have further questions, please review the documentation carefully and consider the challenges of other talents for guidance. Let me know if there is anything else I can help you with.

Best regards,