#2

A short example how to get last 10 reports/numbers/.. of anything.


To test it i added it under the main() part. You can add it then in your command.
pawn Код:
main()
{
    new reports = 30; //You have 30 reports in your database.
    new a = reports -9;//You want to get the last 10 reports. 9 because you need to count also the newest report. That's the reason we use a<= reports, bc the last report should also be shown.
    while( a<=reports)
    {
        printf("%i",a);
        a++;
    }
    return 1;
}
That was the output:
Код:
21
22
23
24
25
26
27
28
29
30
Means, it will always show you the last reports.

This is just an example how you can make it, now you need to write by yourself a code for it. I hope i made it understandable.
Reply


Messages In This Thread
Help - by Edw - 25.12.2014, 15:31
AW: Help - by Flori - 25.12.2014, 16:30
Re: Help - by Edw - 25.12.2014, 17:14
Respuesta: Help - by [DOG]irinel1996 - 25.12.2014, 17:36

Forum Jump:


Users browsing this thread: 2 Guest(s)