Raised This Month: $ Target: $400
 0% 

reading & writing to a file


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 03-11-2006 , 13:31  
Reply With Quote #2

oh come on!

i made a test script; it reads the file just fine but cant write anything into it
Code:
new form[128], steamid[32] get_user_authid(id, steamid,31) format(form,127, "%s %s", steamid, bla) new data[64], authid[32], len new fid = fopen(settingsfile, "rwt") while(!feof(fid)) {     fgets(fid, data,63)     len = strlen(data) * -1     strbreak(data, authid,31, data,1)     if(!equal(steamid,authid)) continue     fseek(fid, len,SEEK_CUR)    //goto start of the line     break } fprintf(fid, form) fclose(fid)

or do i just need to first read, then close and open it again for writing?
__________________
plop
p3tsin is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:18.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode