Thank you for all your responces. I THINK I am following along so far, but the last element of Section 1 is throwing me off. What are you refering to be 'second term' in that function? Its not the argument I assume, so I'm not sure where to place that code. I've tried placing it as the second argument and setting 'include_weapons_we_have' to `global.weapon_data[c][pstat_POSSIBLEUPGRADES][d][dbupgd_MAXUPGRADES]`, but this does not work.
Edit: If by second term you meant of the initially referenced line, I changed it to the following:
`if((global.weapon_upgrades_obtained[c] < global.weapon_data[c][pstat_POSSIBLEUPGRADES][d][dbupgd_MAXUPGRADES]) || allow_surpassing_max_level){ //Can we upgrade it further?`
and got the following error, just in case
___________________________________________
############################################################################################
ERROR in
action number 1
of Step Eventobj_player
for object parent_collectibleitem:
Push :: Execution Error - Variable Index [14] out of range [2] - -5.weapon_upgrades_obtained(100135,14)
at gml_Script_playerweapon_randomly_pick_some_random_upgrades (line 97) - if((global.weapon_upgrades_obtained[c] < global.weapon_data[c][pstat_POSSIBLEUPGRADES][d][dbupgd_MAXUPGRADES]) || allow_surpassing_max_level){ //Can we upgrade it further?
############################################################################################
gml_Script_playerweapon_randomly_pick_some_random_upgrades (line 97)
gml_Script_ics_exp (line 23) - playerweapon_randomly_pick_some_random_upgrades(3,true,true,global.player_level >= 3,global.player_level >= 3,true,false)
gml_Object_parent_collectibleitem_Collision_obj_player (line 3) - collection_script()