Writing new plug in, I need help

Hello

I am writing a new plug in but it is the 1st time i have added coding to a table. This code will not compile and the error is 'type mistmatch'. Here is the code and it is on the ifTable.

index: number;

for index := 1 to getArrayLength(ifOperStatus)
begin
 if ifOperStatus = 2 then
  begin
   doResponse('INTERFACE_DOWN', 'Router 2 Error', '', '', '', '');
  end;
end;

thank you for your time.

I think that ifOperStatus is

I think that ifOperStatus is an array type, if this is a table (which ifTable is of course). Therefore it's probably the use of arrays which is the problem.

>if ifOperStatus = 2 then

This should probably be

>if ifOperStatus[index] = 2 then

This will then work for each row.