RobotStudio event

RECORD type in RAPID

Hello, i am sorry if this question is already answered or exists but I really can't find solution. 

In RAPID I want to create new data type using RECORD but inside RobotStudio i get syntax error message as follows: Unexpected 'record' identifier 'endrecord'. 
If i remove ENDRECORD i get 'trap' associated syntax errors.
I do not have anything written inside the record to exclude additional errors.
I've read something about Advanced RAPID from ChatGPT, I know it is not a reliable source, but i had to try. 

I am using Robot ware 7.15.X if needed

Regards,
Martin

Best Answer

  • lemster68
    lemster68 ✭✭✭
    Answer ✓
    Records MUST be declared at the very top of the module in which they are declared.  The controller gets quite unhappy if they are not and gives these kind of mystifying errors.
    Lee Justice

Answers

  • @lemster68 Thank you very much! This is such specific thing that I might have missed it while reading the documentation.

    I guess every language with its tricks haha.

    Cheers!