sandman Posted April 23, 2007 Share Posted April 23, 2007 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] Link to comment Share on other sites More sharing options...
MHz Posted April 23, 2007 Share Posted April 23, 2007 If your using a relative path, then check the path of the working directory. Link to comment Share on other sites More sharing options...
sandman Posted April 23, 2007 Author Share Posted April 23, 2007 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] Link to comment Share on other sites More sharing options...
MHz Posted April 23, 2007 Share Posted April 23, 2007 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 Link to comment Share on other sites More sharing options...
sandman Posted April 23, 2007 Author Share Posted April 23, 2007 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] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now