Basic IDE '=' expected(3) error

I have the following function used to parse a message of the form
“Itemcode|item_description|Units|People|Units/hr” heres an example -
“PURI-01-000002|12349730_20oz Canister - Friskies Original|2952.00|7.00|333.00”

I want it to use “|” as a delim and save to corresponding tags. Currently using a list as a helper

Function ParseMessage ($message$)
leftindex%=1
rightindex% = INSTR 1,message$,"|"
For $a% = 1 TO 100 STEP 1
IF rightindex% =0 THEN
message_list$($a%, 1 TO 50) = message$(leftindex% TO Len message$ - 1)
item_code@ = message_list$(1)
item_description@ = message_list$(2)
units_expected@ = message_list$(3)
standard_people@ = message_list$(4)
standard_units_per_hour@ = message_list$(5)

RETURN
print item_code@

ENDIF
message_list$($a%, 1 TO 50) = message$(leftindex% TO rightindex%-1)
leftindex%=rightindex%+1
rightindex% = INSTR leftindex%, message$, “|”
NEXT $a%
ENDFN

I’m seeing the error ‘=’ expected (3) 291 :message_list$($a%, 1 TO 50) = message$(leftindex% TO rightindex% -1) on the second of the bolded lines but no error on the first. What am I missing here?

I have dealt with this issue, feel free to remove this topic thanks.