31.01.2014, 14:18
Okay i got this now:
But this shows 100 lines. It does give the right names of people in the club but there are only two members. After that every row shows NULL. How to break the loop when no data is found anymore?
pawn Код:
forward ClubMemberList(playerid);
public ClubMemberList(playerid)
{
new rows, fields, string[1000], pName[MAX_PLAYER_NAME];
cache_get_data(rows, fields, Handle);
for(new i; i < Max_ClubMembers; i++)
{
cache_get_row( i, 0, pName, Handle, 32 );
format(string, sizeof(string), "%s%s\n", string, pName);
}
ShowPlayerDialog(playerid, DialogClubMembers, DIALOG_STYLE_LIST, "Club members", string, "Ok", "Cancel");
return 1;
}