Subj : Baja
To   : Beta
From : Tommyknocker
Date : Sat Jan 09 1999 05:01 am

RE: Baja
BY: Beta to All on Sat Jan 09 1999 12:56 pm

> Okey doke, I've got a couple interesting ones for ppl.  a) how can I get a
> printfile to use a variable instead of typing it in Eg. printfile
> "c:\\sbbs\\test.txt"
> Also, for the same reason, how do i get a variable into a fopen????  Eg. fop
> test o_rdwr "c:\\sbbs\\test.dat"  I need to replace the stuff between the "

First a couple of pointers. Type your qustions and the code you are discussing
seperately. You should enter the code just exactally as you are trying ot use
it.
   Also, if you are writing a mod just for your bbs then using a full path is
ok, but using a global path and directory will work on any standard Sync system
regardless of drive letters.


##### define string variable for later use #####

str testdata

##### open the file on the hard drive. Create it if it does not exist.
###### %j starts us out in the sbbs\data directory #####fopen file1

o_creat|o_rdwr|o_denynone "%jbajamods\\????\\test.dat"


##### now that the file is open you need to read your data from it #####
##### the ?? being the length of the data in question. ####

fread file1 testdata ??



  Now if you use print testdata, whatever was in the file is printed. Not
knowing what you are doing it is difficult narrowing this down any more.
   Also, I know very little Baja, so I am sure there are many versions to this
same task.
                           ��������mm�Kn�k�r������





---
� Synchronet � telnet://talamasca-bbs.com   http://www.talamasca-bbs.com