Sorry, I didn't really bother including my entire code since it is so simple. Ignore everything commented out, I was just playing around with some code.
The addon actually works as intended unless for some reason unit "raidN" is not actually in Nth raid frame. I don't actually know how to inspect a raid frame to see which unit is occupying it.
Any help is appreciated, thanks!
Edit:
Here is what my addon actually does/looks like. You can see the numbers on the raid frames on the bottom (e.g. +123.4k) and just overlays it on the frame.
Edit 2: Also I forgot to mention, it doesn't really matter what raid frames I am using; I am not touching raid frame code, and my raid frames have the same sorting as blizzard frames. This addon is pretty much separate and just sitting on top.