Hello,
I wanted to add news stuff to my plugin, the idea was good, but I encounter a problem. When the first player from the list (players.dat) left, or join other clans, that error appears. Tried changing the map, reload functions, tried modifying, but it gives the same shit. Also, the problem is only from the menu, printing if their online or not and their id is working fine
https://imgur.com/a/NfKyE0S
[It appear only one time, I only double-checked it]
GetData1 is the name of the currently joined clan
g_Words2 is the Clan Name that the player is in (searching from the list 0,1,2,3....)
g_Words1 is The User Name
I'm using that variable count to determine in every array the data that has been loaded.
Also, before using searching for "iPlrId" it still threw me that error.
PHP Code:
public members_menu(id) {
new menu = menu_create("", "MenuHandlerMembers");
new count = 0
new found = 0
while(found != TotalMembersPerClan[id])
{
if(equali(g_Words2[count], GetData1)) {
new ContextOn[192]
formatex(ContextOn, 191, "%s \d[\yOnline\d]", g_Words1[count])
new ContextOff[192]
formatex(ContextOff, 191, "%s \d[\rOffline\d]", g_Words1[count])
new iPlrId = find_player("a", g_Words1[count][0]);
if(is_user_connected(iPlrId)) {
menu_additem(menu, ContextOn, "0")
culoare(id, "!gYES %d", iPlrId)
}
else
{
menu_additem(menu, ContextOff, "0")
culoare(id, "!gNO %d", iPlrId)
}
found++
}
count++
}
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0 );
return PLUGIN_HANDLED;
}
__________________