My scripts always have the same "syntax errors" whilst I can not find any actual syntax errors.
Here I created a small one as an example and would appreciate if anyone could point me to why there always are such errors in the for loops, like: " for(int i = 0; i < period; i++) "

The small sample-script is:
function run()
{
int period = 10; // Set the period for the SMA calculation
var sum = 0;
// Loop through the historical data and calculate the sum of closing prices
for(int i = 0; i < period; i++) // <- IN ALL SCRIPTS I ALWAYS GET AN ERROR IN THE FOR LOOPS HERE
{
sum += priceClose(i);
}
// Calculate the SMA by dividing the sum by the period
var sma = sum / period;
printf("SMA: %.2f", sma);
}

I apprecciate any help or pointers you can give me,
thank you.