Align
#4

The first thing I noticed is that you don't delete the cache and you may experience memory leaks. Threaded queries are always recommended as well.

When retrieving kills/deaths you have rowid as 0 instead of "i" so it will get the data of the first gang returned. Colors are integers so you can save them as such and when load them you can color embedding as:
pawn Код:
"{%06x} ...", color >>> 8, ...
---

Yes, like that but the headers should be outside:
pawn Код:
ganglist = "Gang Name\tGang Score\tGang Kills\tGang Deaths\n";

for (new i = 0; i < count; i++)
{
    cache_get_field_content(i, "color", TempColor);
    cache_get_field_content(i, "name", TempName);
   
    format(ganglist, sizeof(ganglist), "%s{%s}%s\t{FFFFFF}%d\t{23ffaa}%d\t%d\n", ganglist, TempColor, TempName, cache_get_field_content_int(i, "score"), cache_get_field_content_int(i, "Kills"), cache_get_field_content_int(i, "Deaths"));
}
---

Since you select them from the database, why don't you update score, kills and deaths directly so it will always be updated and not like 30 minutes you mention.
Reply


Messages In This Thread
Align - by iLearner - 28.09.2016, 11:00
Re: Align - by Konstantinos - 28.09.2016, 11:13
Re: Align - by iLearner - 28.09.2016, 11:24
Re: Align - by Konstantinos - 28.09.2016, 11:39
Re: Align - by iLearner - 28.09.2016, 13:08

Forum Jump:


Users browsing this thread: 1 Guest(s)