PxPlus User Forum

Main Board => Discussions => Programming => Topic started by: Peter.Higgins on October 09, 2019, 09:24:05 AM

Title: Error 12 instantiating an object
Post by: Peter.Higgins on October 09, 2019, 09:24:05 AM
This might save you some time if you happen to run into it.

Was getting file error 12 on an object instantiation and I wasn't looking for this issue because the object is a file wrapper.  After eliminating the file as perpetrator, while I was expecting a 92 type error, I wasn't expecting this as I wouldn't have thought it possible.  (The mistake obviously!  ;))

In the Class Def, one of the functions had a trailing comma in the arguments as shown below.

FUNCTION FieldByIndexList(KeyStart$,KeyEnd$,Where$,KeyNo,FieldIdx,FieldDelimiter$,)FIELD_BY_INDEX_LIST

This did not throw a line error in the *IT or on a load list in version 2017, only on instantiation.