PDA

View Full Version : write_file help


BigBaller
04-10-2004, 11:30
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?

xeroblood
04-10-2004, 13:42
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..

BigBaller
04-10-2004, 15:27
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.

IceMouse[WrG]
04-10-2004, 21:13
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)

BigBaller
04-11-2004, 11:13
ok I will give it a shot on what you guys were talking about.

BigBaller
04-14-2004, 01:39
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.

QwertyAccess
04-14-2004, 04:07
coding languages is strange that way.