Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This snippet should be added to a first line of code after declarations to check license validity.

Prolog:

Code Block
If( CellGetN( cCubParam, 'Customer Name', 'Numeric' ) + CellGetN( cCubParam, 'Customer Key', 'Numeric' ) < 2 );
    nErrors = nErrors + 1;
    sMessage = 'Product license is not valid, please set customer key in }APQ Settings!';
    sSequenceID = NumberToString( nMultiMsgJSON );
    sMessageJSON = INSRT(' "message":"', sMessage | '"', 1);
    sMultiMsg = Expand( '%sMultiMsg%' | If(LONG(sMultiMsg)=0, '', ', ') | '"' | NumberToString( nMultiMsgJSON ) | '":{%sMessageJSON%}' ); nMultiMsgJSON = nMultiMsgJSON + 1;
    LogOutput( cMsgErrorLevel, Expand( cMsgErrorContent ) );
    ProcessBreak;
EndIf;