Gr0l
Pine Script Rookie
Pine Script Rookie
Posts: 2
Joined: July 12th, 2023

Unidentified error

Dear masters, please tell me about my problem.
1. I wrote this code:
//@version=5
indicator("My Script", overlay=true)

int Max Alert = input.int(10, "Max Alert", minval=1, maxval=100, step=1)
var line[] arLine = array.new_line(0)
.............
.............
.............
if MaxAlert < array.size(arLine)
line.delete(arLine[0])
array.shift(arLine)

2. The compiler gives me the following error on the line "if MaxAlert < array.size(arLine)":
Syntax error at input 'line'

Please, I ask you to tell me what is my syntax error?

I am using Pine Script version 5.

Gr0l
Pine Script Rookie
Pine Script Rookie
Posts: 2
Joined: July 12th, 2023

Re: Unidentified error

The issue is resolved. It is necessary to set the correct number of spaces before the operators.

Return to “Pine Script Q&A”