Need a little help. -
KatsuneBBY - 22.03.2018
Nyaaa, and hi!
I've been noticing this problem for a while, since back then it didn't poke me as much as it did quite recently, I just couldn't help myself, but to ask for some help from chu guys!
V Problem can be seen in this picture, right down bellow.
V
Inside of our script it is like this:
Код:
else if(!strcmp(cmd, "/leaders", true))
{
new pid,leader_text[256],leaders[2048],gettab[33][] = {
" "," "," "," "," "," "," "," "," "," ",
" \t\t ", " \t ", " \t\t ", " \t\t ", " \t\t ", " \t\t\t ", " \t ", " \t\t ",
" "," ",
" \t\t ", " \t\t ", " \t\t ", " \t\t ", " \t\t ",
" "," "," "," "," ",
" \t\t ", " \t\t ", " \t\t " };
for(new i=10; i<33; i++)
{
if(GetOrganizationType(i) != 0)
{
pid += 1;
if(strcmp(FractionInfo[i][fLeader], "none", false))
{
f(leader_text, "{BEBEBE}%d. {D6E01B}%s %s {FFFFFF}| %s %s\n", pid, GetOrganizationName(i), gettab[i], pNickText(FractionInfo[i][fLeader]), GetLeaderStatus(FractionInfo[i][fLeader]));
strcat(leaders, leader_text);
}
else
{
f(leader_text, "{BEBEBE}%d. {D6E01B}%s %s {FFFFFF}| {999999}Nav Lidera\n", pid, GetOrganizationName(i), gettab[i]);
strcat(leaders, leader_text);
}
}
}
ShowDialog(playerid, 00000, DIALOG_STYLE_MSGBOX, "Lideru saraksts", leaders, "Aizvert", "");
return 1;
}
As seen in picture, the list just doesn't look right.
Essentially I believe it's easily fixable, but the problem is - I don't know how.
So please, if someone knows what can be causing this to happen, let me know!
~Thanks~
Re: Need a little help. -
andrey1311 - 22.03.2018
Try to use ZCMD, can be found
here
And u may use DIALOG_STYLE_TABLIST_HEADERS
Take a look
here, it's the 5th style (last one).
Re: Need a little help. -
AdamsLT - 22.03.2018
I think ID 9 and 16 are like that because you didn't fully remove the old organisations so the loop goes through the ids, finds the empty ones and still shows them. You should remove them manually, reassign the ids there from other organisations or something like that.
Or you could try and add another check, like if the organisation name is an empty string - skip that iteration of the loop.
PHP код:
if( isnull(GetOrganizationName(i)) ) continue;
You might need to define it if you don't have it yet
https://sampwiki.blast.hk/wiki/Isnull
Or, I think the best solution, you can see if your GetOrganizationType(i) function works correctly, I think it should return 0 if the organisation doesn't exist. You can try posting it here for a fix by someone.
Not sure how to help with those tabs, I'd need to test it out before suggesting anything but I don't really have the means atm.
Re: Need a little help. -
Nru - 23.03.2018
If the problem is about it's not like listing right try to use
DIALOG_STYLE_TABLIST instead of DIALOG_STYLE_LIST
https://sampwiki.blast.hk/wiki/Dialog_Styles