From 0620c6bc483f6dc340fac482b14cb1d6ed33aa42 Mon Sep 17 00:00:00 2001 From: Nelsonh Date: Sun, 10 Nov 2024 10:49:57 +0000 Subject: [PATCH 1/2] try and report for company_order --- scripts/scr_company_order/scr_company_order.gml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/scr_company_order/scr_company_order.gml b/scripts/scr_company_order/scr_company_order.gml index 74abf8c686..e100e4fe7e 100644 --- a/scripts/scr_company_order/scr_company_order.gml +++ b/scripts/scr_company_order/scr_company_order.gml @@ -36,6 +36,7 @@ function temp_marine_variables(co, unit_num){ } function scr_company_order(company) { + try_and_report_loop("company order", function(company){ // company : company number // This sorts and crunches the marine variables for the company @@ -291,7 +292,7 @@ function scr_company_order(company) { age[co][i]=temp_age[i]; spe[co][i]=temp_spe[i]; god[co][i]=temp_god[i]; - unit = TTRPG[co][i]; + unit = fetch_unit(co, i); unit.load_json_data(json_parse(temp_struct[i])) unit.company = co; unit.marine_number = i; @@ -313,6 +314,7 @@ function scr_company_order(company) { } } }*/ +},company); } From da5fde65b256731bfc1fd32d39f8ba4d0ba67a6a Mon Sep 17 00:00:00 2001 From: Nelsonh Date: Sun, 10 Nov 2024 18:07:12 +0000 Subject: [PATCH 2/2] array tweaks --- scripts/scr_company_order/scr_company_order.gml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/scr_company_order/scr_company_order.gml b/scripts/scr_company_order/scr_company_order.gml index e100e4fe7e..cdb20be27b 100644 --- a/scripts/scr_company_order/scr_company_order.gml +++ b/scripts/scr_company_order/scr_company_order.gml @@ -1,6 +1,6 @@ //stashes varibles for marine reordering function temp_marine_variables(co, unit_num){ - var unit = TTRPG[co][unit_num]; + var unit = fetch_unit([co, unit_num]); if (unit.squad != "none"){ var squad_member; var found = false; @@ -292,7 +292,7 @@ function scr_company_order(company) { age[co][i]=temp_age[i]; spe[co][i]=temp_spe[i]; god[co][i]=temp_god[i]; - unit = fetch_unit(co, i); + unit = fetch_unit([co, i]); unit.load_json_data(json_parse(temp_struct[i])) unit.company = co; unit.marine_number = i;