I have a list of equipment [Optics and Barrels] [index 0 to 31]. I looped through Equipment, and if equipment = optic then post them in Combo Box 1, otherwise post them in combo box 2 [barrel]. The problem here is as follow:
Combo Box 1 [optics] prints index 0-7 which is as expected because they are on top of the list.
Combo box 2 [barrel] prints 7-31 which is correct in theory but I want it to reset to 0 so when I click index 0 in barrel then I get first index of barrel.
Currently If I want to get item 1 on my barrel then I have to select item 8 in combo box 2 [barrel] which is odd.
in the picture below. All equipment are part of the barrel, therefore, it should have started at 0. For example, to get item Barrel 1 in this list I have to click on the 7th element.
Any one can help me identify the problem?
Yes I clear option of previous search.
Also, the get option count didn’t do anything.
Refresh option worked as clear option.
Let me add one more point. Attachment count is 31 total.
0-7 = optics
8 -31 = non optic
note that the first 7 items of the list 8-31 are the same as 0-7. [they return optics.] Not sure why is this doing that. therefore, to get the first item from 8-31 I have to click on index 15.
I did a workaround to output all attachment in non-optic (including optics) how can I remove 0-7 indices aside from using (not equal Enum) apparently that was the problem.
I was able to remove the list, but the problem is that the value is still holding the wrong index. The only way to get the name to equal the index if I list the whole 31 elements.
Found a solution. I thought i’d share with you. I ended up splitting the struct into 2 separate things. [regular attachments] and [non optic attachment].