alevelasco9 0 Posted August 10, 2023 Hi, I have a problem and it is that in this code: switch (_this select 0) do { case "number": { mi_InputText = mi_InputText + format["%1", _this select 1]; ctrlSetText[1000, mi_InputText]; }; case "restar": { mi_InputText = mi_InputText + format["-","%1", _this select 1]; ctrlSetText[1000, mi_InputText]; }; case "clear": { mi_InputText = ""; ctrlSetText[1000, mi_ClearText]; }; case "playerlist": { lbClear 1612; {_dato=lbAdd [1612,name _x];} foreach allPlayers; lbSetCurSel [1612, 0]; }; case "enter": { mi_OutputText = mi_InputText; playername = lbAdd [1612, 1]; hint format["has ingresado %1", mi_OutputText]; [playername, (parseNumber mi_OutputText)] call HALs_money_fnc_addFunds; closeDialog 0; mi_InputText = ""; }; }; I am trying to get the players name as a variable(playername)and as if it were a unit but it gives me an error saying that the variable I give it is a string, does anyone know how to fix it? To contextualize a bit, this variable is taken from a dropdown where the players that are connected are generated. Share this post Link to post Share on other sites