PDA

View Full Version : WriteLine



dmanion
11-05-2003, 07:48 PM
Having problems trying to write an IP to the hosts file.

I read the input from the dialog then: (I added the row numbers for this forum.)

129:function WriteLine(hMSI)
130:STRING szLine, szMsg;
131:NUMBER nvFileHandle;
132:int nFirst, nSecond, nThird, nFourth;
///
134:begin
135:OpenFileMode (FILE_MODE_APPEND);
136:szMsg = "servername" ;
////////
138:szLine = "%d . %d . %d . %d",
nFirst, nSecond, nThird, nFourth, szMsg ;
///////
140:if (OpenFile (nvFileHandle, LE_DIR , LE_FILE) = 0 )
then WriteLine(nvFileHandle,szLine ) ;
//
///////;
144:endif;
145:CloseFile (nvFileHandle);
146:end;
//
I am getting the following error.

Compiling...
Setup.Rul
C:\mytest\myIPControl\Setup.Rul(130) : error C8121: ')' : incomplete parameter list

C:\mytest\myIPControl\Setup.Rul(139) : error C8012: ',' : semicolon expected

Setup.inx - 2 error(s), 0 warning(s)
** Error: -4370: There were errors compiling InstallScript

dgbach
11-06-2003, 10:02 AM
Try the name MyWriteLine(hMSI).

The function you are defining WriteLine is an InstallScript function that takes 2 parameters.

WriteLine ( nvFileHandle, szLine );

-db

dmanion
11-07-2003, 03:21 PM
That was it. I added the szLine. The second error was I had to many arrugments.

thanks.