AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Reading file from bottem to top (https://forums.alliedmods.net/showthread.php?t=55053)

djmd378 05-12-2007 10:52

Reading file from bottem to top
 
How do I make it read from bottem to top of a file?

I tried this...

Code:
public filereadtest(id){     new readdata[127], file = fopen(filename, "r")     while(fgets(file, readdata, 127) {         fseek(file, 0, SEEK_END)         fgets(file, readdata, 127)         parse(readdata, parsedstuff, 127)         client_print(id, print_chat, "%s", parsedstuff)     }       fclose(filename) }


But it still only reads the top line.

stupok 05-12-2007 20:46

Re: Reading file from bottem to top
 
I think the easiest way is to reorganize your data so you can read from top to bottom.


All times are GMT -4. The time now is 06:41.

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