Jump to content
Sign in to follow this  
NickBtheITguy

_FileWriteLog syntax error

Recommended Posts

NickBtheITguy

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?

Share this post


Link to post
Share on other sites
NickBtheITguy

Nevermind. I decided to do it a little differently. I broke it up so it was more like this:

$sLogPath = "C:\logtest.log"
_FileWriteLog($sLogPath, $mrccchk)
_FileWriteLog($sLogPath, $wcap)
_FileWriteLog($sLogPath, $cap_serv)
_FileWriteLog($sLogPath, $screen_resolution)

Share this post


Link to post
Share on other sites
Pain

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)

Share this post


Link to post
Share on other sites
NickBtheITguy

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.

Share this post


Link to post
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
Sign in to follow this  

×