Search the Community
Showing results for tags 'lbdata'.
Found 2 results
-
I am using the following script for an inventory interaction system that passes a classname to another script. Problem is, I'd like to include some ACE items in this interaction, but as far as I can tell, lbData does not work for anything in CfgWeaons (which includes all ACE items). Instead of returning the classname, it returns nothing. Can anyone explain what's going on with this and how I might get it to work? handle = [] spawn { fnc_test = { _idc = ctrlIDC (_this select 0); _selectedIndex = _this select 1; _data = format ["%1",lbData [_idc, _selectedIndex]]; hint format ["%1", _data]; [_data] execVM 'use_item.sqf'; false }; while {true} do { waituntil {!(isnull (finddisplay 602))}; ((findDisplay 602) displayCtrl 633) ctrlAddEventHandler ["LBDblClick", "_this call fnc_test"]; ((findDisplay 602) displayCtrl 638) ctrlAddEventHandler ["LBDblClick", "_this call fnc_test"]; ((findDisplay 602) displayCtrl 619) ctrlAddEventHandler ["LBDblClick", "_this call fnc_test"]; waituntil {isnull (finddisplay 602)}; }; };
-
Hi all, I am in the process of making my own group management but have come across an issue. I can't seem to get the group from lbData command. When I hint the data type it comes back as STRING instead of GROUP but when I do it with getVariable it shows fine. Here's a quick vidoe that I hope shows my problem: // Create test (DUMMY) group testGroup = createGroup blufor; testGroup setGroupIdGlobal ["Test Group"]; // Add the heroic and awesome "Bov" to the group Bov = testGroup createUnit ["B_RangeMaster_F", [0, 0, 0], [], 0, "FORM"]; // Add the above group data to the groups array groups = [["Test Group", testGroup]]; // Not full code, just a snippet... { _groupName = _x select 0; _group = _x select 1; _index = _groupList lbAdd format ["%1", _groupName]; _groupList lbSetData [_index, (format ["%1", _group])]; } forEach groups; // Another file, snippet code... private _groupSelected = _groupList lbData 0; // hintSilent format ["Group Selected > %1 || %2", _groupSelected, typeName (call compile _groupSelected)]; // The above is wrong, had that in the video example, my bad hintSilent format ["Group Selected > %1 || %2", _groupSelected, typeName _groupSelected]; [player] joinSilent (call compile _groupSelected); When I do this: ((player getVariable "groupData") select 1) Works, joins me to the group. typeName ((player getVariable "groupData") select 1) Data type returns GROUP as well.