so, I collected some debug info but I was dumb and wasn't thinking exactly the best way to go about it so I just saved data each time the function was called.
the 2 'objects' i evaluated were weapon_defs[ammo_index] and bots[bot_index].current_weapon
unfortunately, they are not concretely connected ???

because ammo_index does not directly correspond to bots[bot_index].current_weapon except as bots[bot_index].current_weapon.iId
i'm going off of the assumption that index is connected in some way to bots[bot_index].current_weapon and I'm just trying to find the connection.