Posts: 443
Threads: 21
Joined: Jul 2013
How do I read information from a file starting at a certain line?
Sorry for having not posted any code.But how do i..
Posts: 1,474
Threads: 98
Joined: Feb 2011
Reputation:
0
Well, and we are meant to guess what saving system you are using?
Posts: 443
Threads: 21
Joined: Jul 2013
You can use "fread" to start at a position.But it will lag!!
EDIT:@Twizted,i'm using Y_INI
Posts: 443
Threads: 21
Joined: Jul 2013
Sorry for late reply.
OT:I have a command (/registeredplayers) which lists all players that have registered on the server within pages. 20 per page. There's about 166,666 registered players, and once the page count is on like 300 it takes a while to read the file. How could I start at a certain line to stop the delay?
Posts: 734
Threads: 8
Joined: Jun 2009
No other way then
fseek I'm afraid, in combination with
fgetchar. But then you'll be reading char-by-char which is inefficient as hell.
You should've converted to relational database years ago when you saw you're going to get lots of players registering... Why list it in-game anyways? Just get the filename and print it in a website or something...
Posts: 443
Threads: 21
Joined: Jul 2013
Thank you for your reply.I'll try doing something with it and let you know the results.I hope it works this time!