So I've seen lots and attempted lots of solutions to try and erase and partition my hard drive but for some reason it just doesn't seem to work.
What led to this happening was that my hard drive was formatted in Mac OS Extended (journaled) but it became apparent that I needed to have a hard drive that could transfer between a mac and pc computer. so i re-formatted the drive for a MS-DOS (fat) format. once this was finished i tried to put the files back onto my hard drive but it said that this couldn't be done. so i re-opened disk utility and tried to erase the hard drive again but it says POSIX reports:the operation couldn't be completed. Cannot allocate memory. once this didn't work i tried to change the partitions instead but that didn't work either. After all of this i tried to find a solution over the internet and i found one that required me to open terminal and unmount the disk forcefully. but the disk was already unmounted. and when i plug the hard drive into my computer again, it says that this disk you inserted was not readable by this computer.
I really don't know what to do, but i'd like to get my hard drive working, it doesn't matter if anything on the drive is lost, because it's all been backed up on my computer before i tried to change the format.