Need help. Error 32 Semicolon missing.

howto
newbie
quickafl
Tags: #<Tag:0x00007fb3dbcc96b0> #<Tag:0x00007fb3dbcc9520> #<Tag:0x00007fb3dbcc9340>

#1

I am not sure why I am getting a "semicolon missing" error here.
Can someone please advise.

I am using Amibroker Professional Edition (32 bit) v 6.20.1

Thank you in advance

function FillRun( dir, num, changedir ) {

    global i, j, modified, dt, RKC, RKO, RKD, RKH, RKL;
    // Error 32. Syntax error, probably missing semicolon at the end of the previous line
    
    for( x = 1; x <= num AND j < BarCount - 1; x++ )
    {
        j++;
        extra = ( changedir AND x == 1 ) * dir;
        RKC[ j ] = RKC[ j - 1 ] + dir + extra;
        RKO[ j ] = RKC[ j - 1 ] + IIf( modified, 0, extra );
        RKD[ j ] = dt[ i ];
        RKH[ j ] = High[ i - 1 ];
        RKL[ j ] = Low[ i - 1 ];
    }
}

56%20PM


#2

Real error is ELSEWHERE. Not in that function itself, but BEFORE it. Typically you've got missing/unbalanced brace in the code that is placed BEFORE that function.

Example:

{
{

} // unbalanced brace leads to syntax error