Jump to content

_FileWriteLog syntax error


Recommended Posts

I have the following line in one of my script.

$sLogPath = "C:\logtest.log"
_FileWriteLog($sLogPath, @CRLF & $mrccchk & @CRLF & $wcap & @CRLF & $cap_serv & @CRLF "Screen Resolution: " & $screen_resolution & @CRLF)

The program errors on @CRLF but I have seen others use it in their _FileWriteLog lines. Am I missing something?

Link to comment
Share on other sites

You are missing one "&".

Change:

_FileWriteLog($sLogPath, @CRLF & $mrccchk & @CRLF & $wcap & @CRLF & $cap_serv & @CRLF "Screen Resolution: " & $screen_resolution & @CRLF)

To

_FileWriteLog($sLogPath, @CRLF & $mrccchk & @CRLF & $wcap & @CRLF & $cap_serv & @CRLF & "Screen Resolution: " & $screen_resolution & @CRLF)

Link to comment
Share on other sites

You are missing one "&".

Change:

_FileWriteLog($sLogPath, @CRLF & $mrccchk & @CRLF & $wcap & @CRLF & $cap_serv & @CRLF "Screen Resolution: " & $screen_resolution & @CRLF)

To

_FileWriteLog($sLogPath, @CRLF & $mrccchk & @CRLF & $wcap & @CRLF & $cap_serv & @CRLF & "Screen Resolution: " & $screen_resolution & @CRLF)

Nice. I completely missed that. I was thrown off because SciTE was showing the error as being the first @CRLF entry.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...