RobotStudio event

Load program module

Options

I get the error "The source file to be loaded contains RAPID syntax errors" when trying to execute the following code:

The file "rit.prg" contains the code:
MODULE rit
PROC Main()
 LOAD Dynamic,"C:/folder/test.prg";
 %"test:callme"%;
 UNLOAD "C:/folder/test.prg";
ENDPROC
ENDMODULE

The file "test.prg" contains the code:
MODULE test
PROC callme()
 TPWrite "Hello";
ENDPROC
ENDMODULE

The two files are in the same directory.

Does anyone have an idea of what's wrong?

Comments

  • RussD
    Options

    "test" is a reserved keyword in RAPID, which makes it an illegal module name (not the file name).

    Try changing the line: "MODULE test" to "MODULE test1" or to some other name and try it again.

    Also, you must fix your late-binding call, i.e. %"test1:callme"%;

    RussD2007-3-20 22:53:32
    Russell Drown
  • That must me it! I'm kind of embarrassed that I didn't think of that. I will test this the first thing tomorrow morning. Thanks.