Sign in to follow this  
Followers 0
sandman

File does not exist?

5 posts in this topic

Hi,

In experimentation for BlogIt v0.25, I am trying out something that will make posts appear in chronological order - descending. This was how I planned to do it:

(note: $headerthingy is post header, $entryy is post content, and $footerPG is the post footer.)

_FileWriteToLine($headerPG, 1, @CRLF & $headerthingy & $entryy & $footerPG & "</div></div>")

So what this will do is skip a line to make sure it will not be overwritten by the next post, and then write the post content. But every time I do this, I get @error as 2, and according to the helpfile, 2 means that the file does not exist.

I have checked many times, and I am sure that it exists. May this be because _FileWriteToLine() will only allow writing to one line, and no line breaks?


[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Share this post


Link to post
Share on other sites



If your using a relative path, then check the path of the working directory.

Share this post


Link to post
Share on other sites

Well, I was using the same directory before when I used FileWriteLine(), and that worked fine.. but as soon as I switched to _FileWriteToLine() it gave this error. That's why I think it has something to do with the second thing I mentioned.


[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Share this post


Link to post
Share on other sites

This is for @error 2

If Not FileExists($sFile) Then
        SetError(2)
        Return 0
    EndIf
oÝ÷ ØúÞ¾*.±ÊyÚ'¢×!jxv*ÞrÚ+Êì¹Èl¡è­êÞÆ+-²ç¢Ð+{*.²êÞÙÊz-mç«®õ!ø­ÆW°Øg¢X§z̶Ø^©Þ®º+×
.ØZ¦§$x¶Ø^r^jëh×6
    Local $filtxt = FileRead($sFile, FileGetSize($sFile))
    $filtxt = StringSplit($filtxt, @CRLF, 1)
    If UBound($filtxt, 1) < $iLine Then
        SetError(1)
        Return 0
    EndIf

Share this post


Link to post
Share on other sites

No, that is not the problem.. I also tried copying $headerPG to the same folder instead of a remote folder and changing the script so it would look there, but it still told me the file did not exist.


[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

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  
Followers 0