Normal Topic FileWrite coming up blank ... (Read 415 times)
Blair Wettlaufer
Junior Member
Members
**
Offline


No personal text

Posts: 98
Location: Hamilton, ON
Joined: Jun 4th, 2005
FileWrite coming up blank ...
Jul 27th, 2005 at 1:16pm
Print Post Print Post  
Hi all,

Next niggling thing ... I'm trying to get FileWrite to work, and it's creating a file, but it's blank ... what's wrong with my code?

vBellFile = FileOpen("C:\bellnote.txt")
FileSeek(vBellFile, FileSize(vBellFile))
FileWrite(vBellFile,"Testing 123")
FileWrite(vBellFile,vHeader)
FileClose("C:\bellnote.txt")
  

Coesper erat: tunc lubriciles altravia circum&&Urgebant gyros gimbiculosque tophi:&&Moestenui visae borogovides ire meatu:&&Et profugi gemitus exgrabuere rathae
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: FileWrite coming up blank ...
Reply #1 - Jul 27th, 2005 at 1:21pm
Print Post Print Post  
Change the last line to

FileClose(vBellFile)

That should fix it. If it doesn't, after the FileOpen, do

WriteLn(vBellFile)

and make sure vBellFile is > -1. If it isn't, then your file is not opening.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged