Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error C022 Line 3: Missing token ???

Status
Not open for further replies.

atltopgunn

Technical User
Nov 26, 2002
3
CA
I am trying to write a basic script to monitor for a certain string of numbers and at that point then transmit a command.
It's a very simple script, but I can't seem to get it to work.

Below is the script.
Proc main
Waitfor "6000112626" forever
if waitfor
transmit "D C S^M"
endif
endproc

When I try and compile it I receive the following error:
Error C022 Line 3: Missing token

Anyone have any ideas or suggestions?

Thanks!
 
You can remove the third line (if waitfor) and just add "if" to the beginning of your second line. Since the waitfor command returns success or failure, you are able to check the return code of the command in this manner. For a little more information on success and failure, you can read this page: aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top