Help with fwrite..
#1

I need to write from bottom to top, instead of top to bottom, is there a way?
Reply
#2

Nevermind, solved
Reply
#3

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..
Reply
#4

You can use dini for that.
Reply
#5

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
Reply
#6

The tmp size should be the length of the line it reads. So lookup for the longest line and use that value.
Reply
#7

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)