blckeagls
Member-
Content Count
59 -
Joined
-
Last visited
-
Medals
Everything posted by blckeagls
-
lbsort - How do I get the order it sorted?
blckeagls posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Hello All, I have an issue. I have 4 listboxes, and I want to be able to sort by any of them. But when you sort, the rows across all wont get sorted. I was wondering how do I go about getting the index order after the sort? (so i can sort the others by the index order) any help is greatly appreciated What I am looking for is this: _array = ["One","Two","Three"]; { lbAdd [1500,_x]; } foreach _array; _display = findDisplay 734234; _ctrl = _display displayctrl 1500; _order = lbSort _ctrl; // <--- this wont work, does not return value //_order will be [1,3,2]; <---- How do I get this??? I want to sort other listboxes in this order -
lbsort - How do I get the order it sorted?
blckeagls replied to blckeagls's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Outstanding man! Thanks for all your help! -
lbsort - How do I get the order it sorted?
blckeagls replied to blckeagls's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
hmm... just getting alot of errors.... Let me just post my code... Error: 20:19:41 Error in expression <_this; _ctrl = ( ( findDisplay 734234 ) displayCtrl _ctrl ); _compareData = _> 20:19:41 Error position: <displayCtrl _ctrl ); _compareData = _> 20:19:41 Error displayctrl: Type Control, expected Number 20:19:41 File A3ResourceWarCl\PlayerScripts\functions.sqf, line 159 DisplayItemforSale.sqf (called when clicked "Primary Weapons Button") private ["_category","_loop","_unsorted","_sorted","_count","_count1","_sortField","_arrayList"]; lbClear 1501; if (GettingInformation) exitWith {}; GettingInformation = true; _category = _this; TraderResults = "XXX"; PlayerGetTraderList = [_category,player]; publicVariableServer "PlayerGetTraderList"; while {(typeName TraderResults) != "ARRAY"} do { lbAdd [1501,"Getting item list from server"]; //systemChat("Getting information from server"); sleep 1; //systemChat(format["TraderResults: %1 -- type: %2 | _category",TraderResults,typeName TraderResults,_category]); if (!GettingInformation) exitWith { GettingInformation = false; }; }; diag_log format["%1",TraderResults]; lbClear 1501; { _transactionID = _x select 0; _className = _x select 1; _quantity = _x select 2; _seller = _x select 3; _price = _x select 4; _sellername = _x select 5; lbAdd [1501,_className]; lbAdd [1502,_quantity]; lbAdd [1503,_price]; lbAdd [1504,_sellername]; lbAdd [1505,_transactionID]; } foreach TraderResults; _display = findDisplay 734234; _ctrl = _display displayctrl 1501; lbSort _ctrl; [] call fnc_storeLBOrders; _ctrl call fnc_updateLBs; GettingInformation = false; MY Diaglog (see idc = 2406): class TraderMenu { idd = 734234; onLoad = "uiNamespace setVariable ['TraderMenu', _this select 0]"; class Controls { class SellBackpackButton: RW_RscButtonMenu { idc = 2400; text = "Backpack Inventory"; //--- ToDo: RW_Localize; x = -3 * GUI_GRID_W + GUI_GRID_X; y = -8.5 * GUI_GRID_H + GUI_GRID_Y; w = 7 * GUI_GRID_W; h = 2 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; onButtonClick = "call TraderMenuSellBackPack"; }; class ItemsToSellText: RW_RscText { idc = 1000; text = "Items To Sell"; //--- ToDo: RW_Localize; x = -27.5 * GUI_GRID_W + GUI_GRID_X; y = -9.5 * GUI_GRID_H + GUI_GRID_Y; w = 24 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,1}; }; class InventoryText: RW_RscText { idc = 1001; text = "Inventory to Sell"; //--- ToDo: RW_Localize; x = -3 * GUI_GRID_W + GUI_GRID_X; y = -9.5 * GUI_GRID_H + GUI_GRID_Y; w = 7 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,1}; }; class SellVestButton: RW_RscButtonMenu { idc = 2401; text = "Vest Inventory"; //--- ToDo: RW_Localize; x = -3 * GUI_GRID_W + GUI_GRID_X; y = -6 * GUI_GRID_H + GUI_GRID_Y; w = 7 * GUI_GRID_W; h = 2 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; onButtonClick = "call TraderMenuSellVest"; }; class SellUniformButton: RW_RscButtonMenu { idc = 2402; text = "Uniform Inventory"; //--- ToDo: RW_Localize; x = -3 * GUI_GRID_W + GUI_GRID_X; y = -3.5 * GUI_GRID_H + GUI_GRID_Y; w = 7 * GUI_GRID_W; h = 2 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; onButtonClick = "call TraderMenuSellUniform"; }; class SellVehicleInvButton: RW_RscButtonMenu { idc = 2403; text = "Vehicle Inventory"; //--- ToDo: RW_Localize; x = -3 * GUI_GRID_W + GUI_GRID_X; y = -1 * GUI_GRID_H + GUI_GRID_Y; w = 7 * GUI_GRID_W; h = 2 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; onButtonClick = "call TraderMenuSellVehicleInventory"; }; class SellCurrentItems: RW_RscButtonMenu { idc = 2404; text = "Current Items"; //--- ToDo: RW_Localize; x = -3 * GUI_GRID_W + GUI_GRID_X; y = 1.5 * GUI_GRID_H + GUI_GRID_Y; w = 7 * GUI_GRID_W; h = 2 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; onButtonClick = "call TraderMenuSellCurrentItems"; }; class SellLastVehicle: RW_RscButtonMenu { idc = 2405; text = "Last Vehicle"; //--- ToDo: RW_Localize; x = -3 * GUI_GRID_W + GUI_GRID_X; y = 4 * GUI_GRID_H + GUI_GRID_Y; w = 7 * GUI_GRID_W; h = 2 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; onButtonClick = "call TraderMenuSellLastVehicle"; }; class RscText_1002: RW_RscText { idc = 1002; text = "Items To Buy"; //--- ToDo: RW_Localize; x = 11.5 * GUI_GRID_W + GUI_GRID_X; y = -9.5 * GUI_GRID_H + GUI_GRID_Y; w = 20 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,1}; }; class RscText_11000002: RW_RscText { idc = 1000002; text = "Trans No."; //--- ToDo: RW_Localize; x = 5.5 * GUI_GRID_W + GUI_GRID_X; y = -9.5 * GUI_GRID_H + GUI_GRID_Y; w = 5 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,1}; }; class RscText_1006: RW_RscText { idc = 1006; text = "Quantity"; //--- ToDo: RW_Localize; x = 32 * GUI_GRID_W + GUI_GRID_X; y = -9.5 * GUI_GRID_H + GUI_GRID_Y; w = 5.5 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,1}; }; class RscText_1003: RW_RscText { idc = 1003; text = "Price"; //--- ToDo: RW_Localize; x = 38 * GUI_GRID_W + GUI_GRID_X; y = -9.5 * GUI_GRID_H + GUI_GRID_Y; w = 8.5 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,1}; }; class RscText_1004: RW_RscText { idc = 1004; text = "Seller"; //--- ToDo: RW_Localize; x = 47 * GUI_GRID_W + GUI_GRID_X; y = -9.5 * GUI_GRID_H + GUI_GRID_Y; w = 10.5 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,1}; }; class ItemsToBuyInventoryList1: RW_RscListbox { idc = 1501; x = 11.5 * GUI_GRID_W + GUI_GRID_X; y = -8.5 * GUI_GRID_H + GUI_GRID_Y; w = 20 * GUI_GRID_W; h = 43 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,.5}; onLBSelChanged = "if (!DoingSelection) then {[1501] call TradeMenuSelected}"; }; class ItemsToBuyInventoryList5: RW_RscListbox { idc = 1505; x = 5.5 * GUI_GRID_W + GUI_GRID_X; y = -8.5 * GUI_GRID_H + GUI_GRID_Y; w = 5 * GUI_GRID_W; h = 43 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,.5}; onLBSelChanged = "if (!DoingSelection) then {[1501] call TradeMenuSelected}"; }; class ItemsToBuyInventoryList2: RW_RscListbox { idc = 1502; x = 32 * GUI_GRID_W + GUI_GRID_X; y = -8.5 * GUI_GRID_H + GUI_GRID_Y; w = 5.5 * GUI_GRID_W; h = 43 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,.5}; onLBSelChanged = "if (!DoingSelection) then {[1502] call TradeMenuSelected}"; }; class ItemsToBuyInventoryList3: RW_RscListbox { idc = 1503; x = 38 * GUI_GRID_W + GUI_GRID_X; y = -8.5 * GUI_GRID_H + GUI_GRID_Y; w = 8.5 * GUI_GRID_W; h = 43 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,.5}; onLBSelChanged = "if (!DoingSelection) then {[1503] call TradeMenuSelected}"; }; class ItemsToBuyInventoryList4: RW_RscListbox { idc = 1504; x = 47 * GUI_GRID_W + GUI_GRID_X; y = -8.5 * GUI_GRID_H + GUI_GRID_Y; w = 10.5 * GUI_GRID_W; h = 43 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,.5}; onLBSelChanged = "if (!DoingSelection) then {[1504] call TradeMenuSelected}"; }; class RscText_1005: RW_RscText { idc = 1005; text = "Categories"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = -9.5 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,1}; }; class BuyPrimaryWeaponButton: RW_RscButtonMenu { idc = 2406; text = "Primary Weapons"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = -8.5 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 2 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; onButtonClick = """PrimaryWeapons"" execVM ""\A3ResourceWarCl\diaglogs\traderscripts\buyscripts\DisplayItemsforSale.sqf"""; }; class BuyLauncherButton: RW_RscButtonMenu { idc = 2407; text = "Launcher Weapons"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = -6 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 2 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; }; class BuyHandgunButton: RW_RscButtonMenu { idc = 2408; text = "Handgun Weapons"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = -3.5 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 2 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; }; class BuyMagazineButton: RW_RscButtonMenu { idc = 2409; text = "Magazines"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = -1 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 2 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; }; class BuyItemsButton: RW_RscButtonMenu { idc = 2410; ttext = "General Items"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = 4 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 2 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; }; class ButExplosivesButton: RW_RscButtonMenu { idc = 2411; text = "Explosives"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = 1.5 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 2 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; }; class ItemsToSellList: RW_RscListbox { idc = 1500; x = -27.5 * GUI_GRID_W + GUI_GRID_X; y = -8.5 * GUI_GRID_H + GUI_GRID_Y; w = 24 * GUI_GRID_W; h = 42.5 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,.5}; onLBSelChanged = "[_this] call SellChangeQuantity"; }; class BuyWoodButton: RW_RscButtonMenu { idc = 2412; text = "Wood"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = 17.5 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; }; class BuyStoneButton: RW_RscButtonMenu { idc = 2413; text = "Stone"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = 19 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; }; class BuySiliconButton: RW_RscButtonMenu { idc = 2414; text = "Silicon"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = 20.5 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; }; class BuyPlasticButton: RW_RscButtonMenu { idc = 2415; text = "Plastic"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = 22 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; }; class BuyClothButton: RW_RscButtonMenu { idc = 2416; text = "Cloth"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = 23.5 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; }; class BuyMetalButton: RW_RscButtonMenu { idc = 2417; text = "Metal"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = 25 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; }; class BuyChemicalButton: RW_RscButtonMenu { idc = 2418; text = "Chemicals"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = 26.5 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; }; class BuyGunpowderButton: RW_RscButtonMenu { idc = 2419; text = "Gunpowder"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = 28 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; }; class BuyRubberButton: RW_RscButtonMenu { idc = 2420; text = "Rubber"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = 29.5 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; }; class BuyOilButton: RW_RscButtonMenu { idc = 2421; text = "Oil"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = 31 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; }; class BuyVehicleButton: RW_RscButtonMenu { idc = 2422; text = "Vehicles"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = 6.5 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 2 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; }; class RscText_1007: RW_RscText { idc = 1007; text = "Resources"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = 16.5 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,1}; }; class SellPrice: RW_RscEdit { idc = 1400; text = "1"; //--- ToDo: RW_Localize; x = -3 * GUI_GRID_W + GUI_GRID_X; y = 28 * GUI_GRID_H + GUI_GRID_Y; w = 7 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,1}; colorActive[] = {-1,-1,-1,0.5}; }; class RscText_1008: RW_RscText { idc = 1008; text = "Sell Price"; //--- ToDo: RW_Localize; x = -3 * GUI_GRID_W + GUI_GRID_X; y = 27 * GUI_GRID_H + GUI_GRID_Y; w = 7 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,1}; }; class SellButton: RW_RscButtonMenu { idc = 1600; text = "Sell"; //--- ToDo: RW_Localize; x = -3 * GUI_GRID_W + GUI_GRID_X; y = 32 * GUI_GRID_H + GUI_GRID_Y; w = 7 * GUI_GRID_W; h = 2 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.7}; onButtonClick = "call TraderSell"; }; class IGUIBack_2200: RW_IGUIBack { idc = 2200; x = 0.340156 * safezoneW + safezoneX; y = -0.00599999 * safezoneH + safezoneY; w = 0.004125 * safezoneW; h = 1.012 * safezoneH; colorBackground[] = {-1,-1,-1,1}; colorActive[] = {-1,-1,-1,1}; }; class BuyButton: RW_RscButtonMenu { idc = 1601; text = "Buy"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = 32.5 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 2 * GUI_GRID_H; font = "puristaMedium"; }; /* class BuyItemsButton: RW_RscButtonMenu { idc = 2433; text = "General Items"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = 9 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 2 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; }; */ class RscText_1010: RW_RscText { idc = 1010; text = "Quantity"; //--- ToDo: RW_Localize; x = -3 * GUI_GRID_W + GUI_GRID_X; y = 29.5 * GUI_GRID_H + GUI_GRID_Y; w = 7 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,1}; }; class SellQuantity: RW_RscEdit { idc = 1401; text = "1"; //--- ToDo: RW_Localize; x = -3 * GUI_GRID_W + GUI_GRID_X; y = 30.5 * GUI_GRID_H + GUI_GRID_Y; w = 7 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {1,1,1,1}; colorActive[] = {1,1,1,0.5}; }; class SellResourceButton: RW_RscButtonMenu { idc = 2423; text = "Resources"; //--- ToDo: RW_Localize; x = -3 * GUI_GRID_W + GUI_GRID_X; y = 6.5 * GUI_GRID_H + GUI_GRID_Y; w = 7 * GUI_GRID_W; h = 2 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; onButtonClick = "call TraderMenuSellResources"; }; class SellVehicleResourceButton: RW_RscButtonMenu { idc = 2423; text = "Vehicle Resources"; //--- ToDo: RW_Localize; x = -3 * GUI_GRID_W + GUI_GRID_X; y = 9 * GUI_GRID_H + GUI_GRID_Y; w = 7 * GUI_GRID_W; h = 2 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,0.5}; onButtonClick = "call TraderMenuSellVehicleResources"; }; class RscText_1009: RW_RscText { idc = 1009; text = "Put Items Here:"; //--- ToDo: RW_Localize; x = 58 * GUI_GRID_W + GUI_GRID_X; y = 12.5 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; colorBackground[] = {-1,-1,-1,1}; }; class RscCombo_2100: RW_RscCombo { idc = 2100; x = 58 * GUI_GRID_W + GUI_GRID_X; y = 13.5 * GUI_GRID_H + GUI_GRID_Y; w = 9.5 * GUI_GRID_W; h = 1 * GUI_GRID_H; font = "puristaMedium"; }; }; }; Value for "TraderResults" [ ["1","C_Van_01_transport_F","1","76561197962932563","1","NotAvailable"],["2","B_Carryall_oli","1","76561197962932563","2","NotAvailable"],["3","Wood","30","76561197962932563","3","NotAvailable"],["4","FirstAidKit","1","76561197962932563","4","NotAvailable"],["5","FirstAidKit","1","76561197962932563","5","NotAvailable"],["6","150Rnd_762x51_Box_Tracer","1","76561197962932563","6","NotAvailable"],["7","150Rnd_762x51_Box_Tracer","1","76561197962932563","7","NotAvailable"],["8","150Rnd_762x51_Box_Tracer","1","76561197962932563","8","NotAvailable"],["9","150Rnd_762x51_Box_Tracer","1","76561197962932563","9","NotAvailable"],["10","150Rnd_762x51_Box_Tracer","1","76561197962932563","10","NotAvailable"],["11","150Rnd_762x51_Box_Tracer","1","76561197962932563","11","NotAvailable"],["12","150Rnd_762x51_Box_Tracer","1","76561197962932563","12","NotAvailable"],["13","150Rnd_762x51_Box_Tracer","1","76561197962932563","13","NotAvailable"] ] I want to sort 1502,1503,1504,1504 the exact same way as 1501.. If I could get the order 1501 is sorted in, i.e. [1,5,2,6,7,....] then I could easily sort the rest in that order with: { lbadd[1502,(TraderResults select _x) select 2]; lbadd[1503,(TraderResults select _x) select 3]; lbadd[1504,(TraderResults select _x) select 4]; lbadd[1505,(TraderResults select _x) select 5]; } foreach [1,5,2,6,7,....]; -
lbsort - How do I get the order it sorted?
blckeagls replied to blckeagls's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Thanks for the help, unfortunately this does not help me. My issue is that I have an array of 5 values. Each element of the array goes into it's own list box. Some of the values being sorted have the same name but the other value are different. Also, after an lbSort, the index does not change, just the position in the list box. So if "Hello" was in Position 1 of the listbox before the lbSort is would have an index of 1. After the lbSort, lets say it is in postion 10, it would still have an index of 1. -
Hello All, I am working on a mod with a persistent database (MySQL backend). I am having an issue with buildings being skewed after restart. I use getPosWorld to save the position of the object in the Database. Which results look good: [16673.4,13655.5,15.6063] When I restart the server and reload in the objects, I do the following: _className = _vehInfo select 0; _ownerID = _vehInfo select 1; _position = call compile (_vehInfo select 2); _damage = parseNumber (_vehInfo select 3); _Direction = call compile (_vehInfo select 4); _VectorDir = call compile (_vehInfo select 5); _VectorUp = call compile (_vehInfo select 6); _resources = call compile (_vehInfo select 7); _veh = _className createVehicle _position; _veh setPosWorld _position; _Bldgpitch = parseNumber (_vehInfo select 8); _Bldgbank = parseNumber (_vehInfo select 9); _Bldgyaw = parseNumber (_vehInfo select 10); _veh setVariable ["Bldgpitch",_Bldgpitch,true]; _veh setVariable ["Bldgbank",_Bldgbank,true]; _veh setVariable ["Bldgyaw",_Bldgyaw,true]; _veh setDir _Direction; _veh setVectorDir _VectorDir; _veh setVectorUp _VectorUp; [_veh,[_Bldgpitch, _Bldgbank, _Bldgyaw]] call SetPitchBankYaw; Everything works pretty much perfect, except that manytimes, not all, the buildings are moved on x,y by less than .25 of a meter. So there are small gaps and things are not lined up like they are when they were created. Pitch, Bank, or Yaw doesnt seem to be the issue, incase you were wondering that. they are all facing same direction and everything, just moved on the x,y not the vectors Any suggestions to fix? ---------- Post added at 16:23 ---------- Previous post was at 16:04 ---------- Incase anyone was wondering what it looks like: http://zombieville.net/images/ss.jpg (669 kB) ---------- Post added at 17:03 ---------- Previous post was at 16:23 ---------- I think I might have discovered the issue... getPosWorld seems to be rounded to the nearest 1/10 (0.1) when sent as a string. Anyone know a work arround?
-
Looking for help: Building not blowup but take damage and get delete?
blckeagls posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Hello, I have a piece of glass, I want when shot that it "breaks" and then gets deleted. Right now it just blows up like a grenade. I can't find another object that I can assign it attributes to that wont make it invincible. Please help. cfgvehicle: class CfgPatches { class ReflectiveGlass { units[] = {ReflectiveGlass}; weapons[] = {}; requiredVersion = 1.0; }; }; class CfgVehicles { class All {}; class Static: All {}; class Building: Static {}; class NonStrategic: Building {}; class TargetTraining: NonStrategic {}; class TargetGrenade: TargetTraining {}; class ReflectiveGlass: TargetGrenade { model="\ReflectiveGlass\ReflectiveGlass.p3d"; armor=2; scope=2; displayName="1-Direction Reflective Glass"; secondaryExplosion = 0; destrType = "DestructDefault"; minTotalDamageTreshold = 0; }; }; -
Hello, I am a veteran scripter, but a novice modeler. I am having an issue with a wall I created. There is a window in it. I want the window to get destroyed when shot. Is there a way to do this? I tried setting hitpoints. Here is my model.cfg and my config.cpp: class cfgModels { class TargetGrenade{}; class GreyBrickWallWithWindow: TargetGrenade { sectionsInherit="TargetGrenade"; sections[]= { "Glass" }; skeletonName = "GreyBrickWallWithWindow"; }; }; class CfgSkeletons { class TargetGrenade; //Define base class. class GreyBrickWallWithWindow: TargetGrenade { skeletonInherit = "TargetGrenade"; //Inherit all bones from class Car. skeletonBones[] = //Add two new bones. The movement { //of bone2 is linked to bone1. "Glass","" }; pivotsModel = ""; // Location of pivot points (local axes) for hierarchical animation. (A2 only) isDiscrete = 1; /// 1 stands for discrete skinning values (0 or 100 % for each vertex of every selection), 0 stands for non-discrete (each vertex may have different skinning values for selections - animations have just partial effect on that vertex) }; }; class CfgPatches { class GreyBrickWallWithWindow { units[] = {greybrickwallWithWindow}; weapons[] = {}; requiredVersion = 1.0; }; }; class CfgVehicles { class All {}; class Static: All {}; class Building: Static {}; class NonStrategic: Building {}; class TargetTraining: NonStrategic {}; class TargetGrenade: TargetTraining {}; class GreyBrickWallWithWindow: TargetGrenade { model="\GreyBrickWallWithWindow\greybrickwallWithWindow.p3d"; armor=8000; scope=2; displayName="Grey Brick Wall with Window"; class hitZone_0 { armor = 1; material = 55; name = "Glass"; visual = "Glass"; passThrough = 1; hideOnDestroyed = true; visualStateChange[] = {0.1,0.5}; }; }; };
-
Arma2NET works... tried Date command... It's the plugin... I think it's because .Net 4.5 is installed on Sever 2012 by default and can't install .Net 4.0... I am re-imaging system to Server 2008 which it works on..
-
The issue is not with the commands.... the scripts work on Windows 7, Windows Server 2008...... it just does not work on windows server 2012.. Is this a known issue? Anyone else get this to work on server 2012?
-
When the SQF executes: _sql = format["Arma2NETMySQLCommand [dayz_epoch,%1]",_sqlstatement]; SQL_RESULT = "Arma2Net.Unmanaged" callExtension _sql; (owner _theplayer) publicVariableClient "SQL_RESULT"; the server freezes.....
-
Yep... the logs I posted were from there.... the MySql addin does not produce logs... the server just freezes when I issue command...
-
Pass it through PublicVariableClient
-
_returnvalue = [[["78436529386389"]]] _returnvalue = _returnvalue select 0; //_returnvalue now equals [["78436529386389"]] _returnvalue = _returnvalue select 0; //_returnvalue now equals ["78436529386389"] _returnvalue = _returnvalue select 0; //_returnvalue now equals "78436529386389" _returnvalueNum = parseNumber(_returnvalue); //_returnvalueNum now equals 78436529386389 _returnvalueStr = str(_returnvalueNum); //_returnvalueStr now equals "78436529386389" _returnvalueFormatStr = Format["%1%2",_returnvalueStr,"X"]; //_returnvalueFormatStr now equals "78436529386389X"
-
Hello... Game runs fine until a command is executed to run a SQL query. I have an issue with Arma2NETMySQL working on Windows Server 2012. I have all the Prerequisites installed. It works on my desktop running Windows 7, but not on Windows Server 2012. On the Windows Server 2012, arma2oaserver.exe just hangs. Doesn't say not responding but has 0% cpu utilization and players get disconnected and are unable to reconnect, (Sit at waiting for host) I've ensured all .dll's are unblocked. I ensured the permissions on files are correct. I've tried to run the server as administrator. Nothing seems to fix the problem. Anyone have this working on windows server 2012? Any help on this would be greatly appreciated. Here is logs: Arma2NET.2014-3-20.Log: Arma2NET.log: Arma2NETMySQL log: Nothing....
-
This is still no working. The script runs, but provides no results. Here is my scripts. _result = "Arma2Net.Unmanaged" callExtension "Arma2NETMySQLCommand ['dayz_epoch', 'SELECT * FROM object_data LIMIT 1']"; sleep 2; cutText [format["This is result: %1",_result],"PLAIN"]; _result = "Arma2Net.Unmanaged" callExtension "Arma2NETMySQL ['dayz_epoch', 'SELECT * FROM object_data LIMIT 1']"; sleep 2; cutText [format["This is result: %1",_result],"PLAIN"]; _result = "Arma2Net.Unmanaged" callExtension "DateTime ['now',]"; sleep 2; titleText [format["This is Date: %1",_result],"PLAIN DOWN"]; sleep 2; hint ("Arma2Net.Unmanaged" callExtension "DateTime ['now', 'HH:mm:ss dd/MM/yyyy']"); I just get the text, no results. The hint message doesn't display also. Also, there is no logs when I run it in game. When I run the "Arma2NetExplorer.exe" it produces logs and works correctly. Here is my startup line: start "arma2" "Expansion\beta\arma2oaserver.exe" -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus -Arma2NETDev "-mod=@Arma2NET;@DayZ_Epoch;@DayZ_Epoch_Server;Expansion/beta;Expansion/beta/Expansion;" -cpuCount=14 -maxMem=20470 -exThreads=0 -showscripterrors
-
Bump!
-
It does not create a log when i run the script in game... ---------- Post added at 20:00 ---------- Previous post was at 19:29 ---------- This should work in an SQF if Arma2NET is running: _text = "Arma2Net.Unmanaged" callExtension "ClrVersion"; titleText[format["Version: %1",_text],"PLAIN"]; Here is my start script: cd "D:\SERVER\Server" start "arma2" "Expansion\beta\arma2oaserver.exe" -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" -arma2netdev "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@Arma2NET;@DayZ_Epoch;@DayZ_Epoch_Server;Expansion/beta;Expansion/beta/Expansion;" -cpuCount=4 -noCB -maxMem=10000 -exThreads=1 It does not run on my server. Why?
-
I did a wrong copy paste.. edited post with correct code and logs... I don't think the issue is not with the code anyhow... It does not run when the server starts up.... I should receive some kind of logs (error or not) when the commands are executed... I receive nothing. I have only one database in my database.sqf file... I have tested and they work through arma2net explorer... Can we focus on getting this to run in the actual game? It runs in Arma2NET Explorer... Just not in the actual game.... ---------- Post added at 19:06 ---------- Previous post was at 18:58 ---------- Directory Listing of Server/ Directory Listing of @Arma2NET
-
My SQF Code with execution comments When I run these commands in Arma2NET Explorer, they work..... This is what I run in Arma2NET Explorer and it work: ClrVersion Arma2NETMySQLCommand ['dayz_epoch', 'SELECT * FROM donor_bank LIMIT 3'] Arma2NETMySQLCommand ['dayz_epoch', 'insert into donor_bank (PlayerUID) values (555555) '] Startup line: start "arma2" "Expansion\beta\arma2oaserver.exe" -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" -arma2netdev "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@Arma2NET;@DayZ_Epoch;@DayZ_Epoch_Server;Expansion/beta;Expansion/beta/Expansion;" -cpuCount=4 -noCB -maxMem=10000 -exThreads=1 Why does this not work in game? ---------- Post added at 18:39 ---------- Previous post was at 18:26 ---------- This is the Arma2NET Explorer Logs (I get no logs through game). ARMA2NET Log: Arma2NETMySQL Log:
-
From Add/Remove programs I: Uninstalled all .NET packages.. Uninstalled all visual c++ packages... Uninstalled SqlLite... Then I: Installed http://download.microsoft.com/downlo...Full_setup.exe Installed http://system.data.sqlite.org/blobs/...0-1.0.89.0.exe (clicked the check boxes install assemblies into global cache & designer components) Installed http://download.microsoft.com/downlo...redist_x86.exe (c++ redist 2008) Then I checked Add/Remove programs and here is what is installed: Microsoft .NET Framework 4 Client Profile Microsoft .NET Framework 4 Extended Microsoft .NET Framework 4.5 Multi-Targeting Pack Microsoft .NET Framework 4.5 SDK Microsoft .NET Framework Multi-Targeting Pack Microsoft .NET Framework Multi-Targeting Pack (ENU) Microsoft .NET Framework SDK Microsoft Visual C++ 2008 Redistributable - x85 9.0.21022 Microsoft Visual C++ 2010 x86 Redistributable - 10.0.40219 System.Data.SQLite v1.0.89.0 Does not load into Arma 2... Is it not compatible with Dayz_Epoch???? What am I doing wrong for it not to load in the Server but the "Arma2NET Explorer" executes correctly. Even the mysql plugin works with the "Arma2NET Explorer".... Just doesnt work in the mod when I do any of these: titleText[("Arma2Net.Unmanaged" callExtension "ClrVersion"),"PLAIN"]; _insertTest = "Arma2Net.Unmanaged" callExtension "Arma2NETMySQLCommand ['dayz_epoch', 'insert into donor_bank values (34555,44344444)']"; But in Arma2NET_Explorer this runs perfectly: ClrVersion Arma2NETMySQLCommand ['dayz_epoch', 'insert into donor_bank values (34555,44344444)'] ---------- Post added at 00:45 ---------- Previous post was at 00:40 ---------- This is on my sqf script... All but the _insertTest work.... Any ideas? hint ("HELLO"); sleep 1; insertTest = "Arma2Net.Unmanaged" callExtension "Arma2NETMySQLCommand ['dayz_epoch', 'insert into donor_bank values (34555,44344444)']"; hint ("executed"); Output: Hello (pause) Executed No changes in database....
-
Any other ideas on why it doesn't run in the mod? am i calling it wrong? Is it not compatible with Dayz_Epoch?
-
So here is my sqf that runs: It performs the hint ("HELLO"); then does nothing. At a minimum... if Arma2NET was working I should get a hint of the version.....
-
Ok no error on the Arma2NET Explorer... But it still didn't run inside the server.... No logs created when ran as a mod.... From Add/Remove programs I: Uninstalled all .NET packages.. Uninstalled all visual c++ packages... Uninstalled SqlLite... Then I: Installed http://download.microsoft.com/download/1/B/E/1BE39E79-7E39-46A3-96FF-047F95396215/dotNetFx40_Full_setup.exe Installed http://system.data.sqlite.org/blobs/1.0.89.0/sqlite-netFx40-setup-bundle-x86-2010-1.0.89.0.exe (clicked the check boxes install assemblies into global cache & designer components) Installed http://download.microsoft.com/download/1/1/1/1116b75a-9ec3-481a-a3c8-1777b5381140/vcredist_x86.exe (c++ redist 2008) Then I checked Add/Remove programs and here is what is installed: Microsoft .NET Framework 4 Client Profile Microsoft .NET Framework 4 Extended Microsoft .NET Framework 4.5 Multi-Targeting Pack Microsoft .NET Framework 4.5 SDK Microsoft .NET Framework Multi-Targeting Pack Microsoft .NET Framework Multi-Targeting Pack (ENU) Microsoft .NET Framework SDK Microsoft Visual C++ 2008 Redistributable - x85 9.0.21022 Microsoft Visual C++ 2010 x86 Redistributable - 10.0.40219 System.Data.SQLite v1.0.89.0 ---------- Post added at 20:38 ---------- Previous post was at 20:37 ---------- Here is log from Arma2NET Explorer 01/30/2014 14:31:40 Arma2NET 2.3.0.0 running on CLR 4.0.30319.1 01/30/2014 14:31:40 Loaded into process Arma2NetExplorer 01/30/2014 14:31:41 Loading add-ins 01/30/2014 14:31:41 Domain Name Version Publisher Description 01/30/2014 14:31:41 Arma2NetExplorer.exe Arma2NETMySQL 0.1.0.0 firefly2442 Runs MySQL procedure commands. 01/30/2014 14:31:41 Arma2NetExplorer.exe Arma2NETMySQLCommand0.1.0.0 firefly2442 Runs raw MySQL/SQLite commands 01/30/2014 14:31:41 Arma2NetExplorer.exe Arma2NETMySQLCommandAsync0.1.0.0 firefly2442 Runs asynchronous raw MySQL/SQLite commands 01/30/2014 14:31:41 Arma2NetExplorer.exe ClrVersion 2.0.0.0 Scott_NZ Retrieves the version of the Common Language Runtime. 01/30/2014 14:31:41 Arma2NetExplorer.exe CompareVersion 2.0.0.0 Scott_NZ Compares two version strings and returns an integer indicating how they compare. 01/30/2014 14:31:41 Arma2NetExplorer.exe Version 2.0.0.0 Scott_NZ Returns the version of Arma2NET. 01/30/2014 14:31:41 Arma2NetExplorer.exe GetClipboardText 1.0.0.0 Scott_NZ Gets the clipboard text value. 01/30/2014 14:31:41 Arma2NetExplorer.exe SetClipboardText 1.0.0.0 Scott_NZ Sets the clipboard to a text value. 01/30/2014 14:31:41 Arma2NetExplorer.exe CommandLine 2.0.0.0 Scott_NZ Returns the command line used to start the application. 01/30/2014 14:31:41 Arma2NetExplorer.exe DateTime 2.0.0.0 Scott_NZ Returns the current date and time. 01/30/2014 14:31:41 Arma2NET initialized in 00:00:00.0973451 01/30/2014 14:31:41 function: ClrVersion 01/30/2014 14:31:41 maxResultSize: 4095 01/30/2014 14:31:41 Result size: 13 01/30/2014 14:31:41 Result: "4.0.30319.1"
-
Did not work...
-
Downloaded: http://system.data.sqlite.org/blobs/1.0.89.0/sqlite-netFx40-setup-bundle-x86-2010-1.0.89.0.exe Installed... Same error in log... Command will execute in the Arma2NET Explorer.... but it doesnt seem to load when i run it as a mod in Arma 2