table index is nil



Hook 'HUDPaintHook' Failed: table index is nil


I really have no idea what this is due to, so I don’t know what to post as well.
The table EXISTS, but it keeps giving me this error.
What is this usually due to other than not specified table?

Are you trying to use a “for i = num, num2 do table* end” and the index is non-numerical? Never had that error some I’m taking a guess here.

Your guess is right. I’m using that.
Should I use pairs?

You’re trying to index the table with a nil value.

Using an iteration loop to select table methods only works if the table index is numerical, which it usually is unless you’ve manually set the index to a string or a non-sequential list of integers, Pairs is your safest bet, ipairs only works for sequential-numerical indexes as well.

Hey thanks, I didn’t look for that kind of problem.
It worked.

@Averice Yeah, _Kilburn explained me how ipairs, pairs and i work. I know that.