Raised This Month: $ Target: $400
 0% 

write_file help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 04-10-2004 , 11:30   write_file help
Reply With Quote #1

Code:
native write_file(const file[],const text[],line = -1);

I am wondering, if I set line= -1 to like 0 or 1 would that overwrite current settings in a file?
__________________

BigBaller is offline
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 04-10-2004 , 13:42  
Reply With Quote #2

write_file creates & appends text to a file.. if you want to overwrite it, check if it exists, delete, and create new one.. write_file creates the file if it doesn't exist..

Alternatively, if you only want to overwrite one line, set the line parameter to the line number to overwrite..
xeroblood is offline
Send a message via MSN to xeroblood
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 04-10-2004 , 15:27  
Reply With Quote #3

ok xeroblood, I follow barely a lil, how exaclty would I do that, I am trying to fix the problem with Deags' Map Manager, were the mapvault.dat is deleted and recreated after ever map change, thus making any settings that you wish to change or save be useless on the next map change.
__________________

BigBaller is offline
IceMouse[WrG]
Senior Member
Join Date: Mar 2004
Old 04-10-2004 , 21:13  
Reply With Quote #4

Writing to a line does exactly what you would expect it to do... Write exactly to that line

Which would be useful if you wanted a set format for your files(You want the data on line 1 to be the name no matter what)
IceMouse[WrG] is offline
Send a message via AIM to IceMouse[WrG] Send a message via MSN to IceMouse[WrG] Send a message via Yahoo to IceMouse[WrG]
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 04-11-2004 , 11:13  
Reply With Quote #5

ok I will give it a shot on what you guys were talking about.
__________________

BigBaller is offline
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 04-14-2004 , 01:39  
Reply With Quote #6

Wow thanks, took me a while to play around with but I figured it out, i found out with AMXX that if you want to right on line 20 you have to place 19 in the coding, kinda screwy but that helped, thank you guys.
__________________

BigBaller is offline
QwertyAccess
Veteran Member
Join Date: Feb 2004
Location: Enjiru Layer
Old 04-14-2004 , 04:07  
Reply With Quote #7

coding languages is strange that way.
__________________
QwertyAccess is offline
Reply



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 06:13.


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