Hi,
I want to display the list of player name in my rsclistbox and when I click on a player, I’m teleported to him.
This is my RscListbox (who is in my dialog named menu_teleport) :
// List
class listbox : RscListbox {
idc = 11500;
x = 0.314375 * safezoneW + safezoneX;
y = 0.291 * safezoneH + safezoneY;
w = 0.180469 * safezoneW;
h = 0.396 * safezoneH;
};
This is my playerteleport.sqf :
createDialog "menu_teleport";
{
lbAdd [1500, name _x];
lbSetData [1500, _forEachIndex, _x];
} forEach allPlayers;
I have a error :
Error Type Objet, String waited
I have done several tests with other functions but no player name is displayed (I made tests with unit names too and I have the same error). I understand that the variable is not good but how can I return a player name in string ?
I found several posts that had the same error but the given solutions don't work for me.
Do you have any idea?