Make the modifications shown in red in the boards.txt file where you added the new atmega8 board.
This is required of later (post-leonardo) IDE versions (when "variants" were introduced.)
thank you. It has solved the first upload error, but gives me a new one. I know this means my pc is not com. with my m8, but I have doubled check the lines already. did that hold the button to reset and released it when uploading many times.
Binary sketch size: 914 bytes (of a 7,168 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x00