MV How to get the elements from the system and the battlers to match up?

I'm struggling with this for my plugin. The order of elements in the element rate of battlers and the system's elements do not match up. The first of the system starts at an array position of 1 and is physical. The element rate function starts at position 0 and is fire. These are the default files. I wish I could create 2 lists and sort them but I just cannot. The element rate and the element traits are not arrays. I need them to match up to the battler's element rate function. Please help me out.
It would be helpful if you gave examples of what you were looking at...in my game, entering a trait on an actor or class and selecting Element Rate shows the exact same list in the exact same order as I have it defined in my Types tab of the database under Elements.

So...what code are you looking at that isn't using that same list?
Well, I need to get the element rate of the elements. And, like I said, when I compare the element rate function of a battler, it is different from the array of elements from the system. I need them to be the same array somehow. If I had the array of system elements the same as the element rate function of battlers, then I can do it.
perhaps you should give the name of the function instead of only talking about it, so people can know exactly what function you were talking about?
Game_BattlerBase.elementRate() accepts an index as low as 0 as first position and that returns Fire in the default system. This returns the elemental rate based on the number 1. I need this function.

$dataSystem.elements is an array but starts at index 1. Index 0 is nil/null. At index 1 the element is Physical in the default system and it says so as a text string.

I need these to somehow equal by index (like Game_BattlerBase.elementRate(0) and $dataSystem.elements[1] are both Fire elements, Game_BattlerBase.elementRate(3) and $dataSystem.elements[4] are both Darkness elements, etc.)
Game_BattlerBase.elementRate() accepts an index as low as 0 as first position and that returns Fire in the default system.
I'm sorry, but you're incorrect. the elementRate() function uses the exact same indices that you define in the Types tab, which the $dataSystem.elements[] array uses.

I made a new project and gave an actor different resistances to each element. I tested the elementRate values using the index numbers in the Types list and they were exactly what I expected them to be. It will "accept" an index as low as 0, in terms of it not throwing an error, but that doesn't refer to an element in your game.

If you're getting something else in your game, then you have a malfunction from some other plugin or code that you're using.
Ah @ATT_Turan has solved it for me! I had to make the exact same index/position for both the elementRate() and the elements[]. I was confused about those instructions where the elements[] don't have 0 as an index and thought that elementRate() was always 1 index less than it, and so starts at the index of 0 instead of 1.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-get-the-elements-from-the-system-and-the-battlers-to-match-up.143297/