Help with fwrite.. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with fwrite.. (
/showthread.php?tid=191356)
Help with fwrite.. -
The_Moddler - 18.11.2010
I need to write from bottom to top, instead of top to bottom, is there a way?
Re: Help with fwrite.. -
The_Moddler - 18.11.2010
Nevermind, solved
Re: Help with fwrite.. -
The_Moddler - 19.11.2010
Hmm, another question, is there any way to write in the middle of the file?
For example:
pawn Код:
text1..
text2..
text3..
//insert here something
text4..
text5..
Re: Help with fwrite.. -
xxxDunecatxxx - 19.11.2010
You can use dini for that.
Re: Help with fwrite.. -
The_Moddler - 19.11.2010
Okay, I got it solved, now another question...
if I do:
pawn Код:
while(fread(file, tmp))
{
//do something here..
}
What should be tmp size?
I mean, in-game max characters are 128, so when I format something in a command, I use 129 to save what the player typed, but in this case I have no idea on how much long a line can be.. 128 or 256?
Thanks
Re: Help with fwrite.. -
RyDeR` - 19.11.2010
The tmp size should be the length of the line it reads. So lookup for the longest line and use that value.
Re: Help with fwrite.. -
The_Moddler - 20.11.2010
Thanks