SearchStructComponent gives me Status -30
I'm trying to get this code working but it always gives me Status -30.
Using the Put or Get commands works fine.
The variable TestTable is a datatype with 30 instances of the same datatype as variable SearchStruct and FoundStruct.
SearchStruct.ID is an uint.
ComponentFound := SearchStructComponent( Struct := TestTable,
SearchIndex := SearchIndex,
SearchCount := SearchCount,
SearchStruct := SearchStruct,
SearchComponent := SearchStruct.ID,
FoundStruct => FoundStruct,
Status => StructStatus );
Could someone please help me understand whats wrong?