I apologize for the very long delay in reply, but I ended up frustrated and giving up on the project due to not being able to get it working. Trying it again now, I believe I managed to create the 2D array properly wit the following:
global.weapon_upgrades_obtained = array_create(WID_MAX,0) //Number of upgrades for each weapon in the game
//global.weapon_upgrades_obtained = [array_create(WID_MAX,0),array_create(PWD_LOCALDATA_MAX,0)] //Number of upgrades for each weapon in the game
global.passive_upgrades_obtained = array_create(PID_EX_MAX,0) //Number of upgrades for each passive in the game
//Properly Initialize Var
for(var i = 0; i < array_length(global.weapon_upgrades_obtained); i++) {
global.weapon_upgrades_obtained[i] = array_create(PWD_LOCALDATA_MAX);
}
But now the line that is:
if((global.weapon_upgrades_obtained[c][d] < global.weapon_data[c][pstat_POSSIBLEUPGRADES][d][dbupgd_MAXUPGRADES]) || allow_surpassing_max_level){ //Can we upgrade it further?
throws me an error about local variable 'd' not being found, which makes sense since its not initially until the loop starts beneath that line of code.