DAQFactory


cdelareza

Recommended Posts

I was trying to make the following sequence work"

private fileexists = File.GetFileExists(d:\hmi\alarmfile.txt)
if (fileexists == 0)
   private file = file.open(d:\hmi\alarmfile.txt,1,1,0,1)
   file.Close(file)
   File.MakeDirectory(directoryname)
endif

of course i forgot many "

but i kept reading an alert.

C1058 No ) found: StartAlarmText1 Line 2 - Uncaught error in sequence StartAlarmText1

I've even rewrited my sequence to find where I was missing an ) but the problem was actually an "

I've already made the sequence work just wanted you to know about this.

Regards,

Link to comment
Share on other sites

Nothing is going to work correctly until you put the right quotes in. Because you didn't put quotes around the path, the sequence parser got to the \ which indicates that you want to move to the next line (its used to split lines).

private fileexists = File.GetFileExists("d:\hmi\alarmfile.txt")
if (fileexists == 0)
   private file = file.open("d:\hmi\alarmfile.txt",1,1,0,1)
   file.Close(file)
   File.MakeDirectory(directoryname)
endif

Also, be sure and properly indent your code. This is very important. I fixed your post because it was short, but often insist on proper indentation when script is sent to us. There are many different styles of programming, but EVERYONE does proper indentation.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.