Posts: 2,593
Threads: 34
Joined: Dec 2007
Propably you need read whole file and count lines then open again and reads only last 10 lines xd
Posts: 540
Threads: 35
Joined: Feb 2016
Reputation:
0
Why not use MySQL? Easiest way ever.
Posts: 543
Threads: 4
Joined: Jul 2015
Reputation:
0
Not the easiest but the most effective way, SQL is a whole language apart tho
Posts: 296
Threads: 32
Joined: Jun 2018
Reputation:
0
Thanks but can someone give me a stock or a function like
ReadLastLines(const LogFile[])
Posts: 1,071
Threads: 24
Joined: Aug 2014
Reputation:
0
Search over internet for general logic of file buffer. You then just have to apply that logic in PAWN. It will be a good exercise for you.
Posts: 296
Threads: 32
Joined: Jun 2018
Reputation:
0
GTLS, I found nothing by searching like that
Why everyone not giving what i need
I need a function
Posts: 117
Threads: 4
Joined: Feb 2018
you should probably try SQL. here's an example of how simple it'd be if you wanted to do it that way.
Код:
mysql_tquery(sqlhandle, "SELECT * FROM `reports` LIMIT 10", "OnPlayerViewReports", "d", playerid);
forward OnPlayerViewReports(playerid);
public OnPlayerViewReports(playerid)
{
// yada yada
}
this is just a brief example.