well, the code is actually highly useful to me. I am supposed to use it to send data between client and server for a rpg i'm trying to code.
of course, the project is not one i believe i will complete anytime soon, if ever, in the current form, but struggling with this kind of problems tears on my motivation.

I have, thanks to you guys, now gotten past this irritating problem.
I find it rather amusing that the solution was VERY similar to what i myself had tried. i believe the word "packed" is the largest difference.
funny that that word could have saved me 12 hours of "pulling my hair".