Right im going to explain this in full, in the hope of someone really clever will help me out. Im from the UK and im on the carrier o2.
(I know this is a read but im completely out of ideas here).

I did alot of research into jailbreaking before I actually jailbroke my iPhone so I know quite abit but im completely stuck and havent found anyone else that seems to be having the same problem as me.

So heres the story of my jailbreak:
I jailbroke the first time on 3.1.2 and used Blackra1n to do so. It was simple and easy but I kept getting alot of problems with my iPhone (i.e. the volume button kept jamming and the stand by button used to jam and just turn off my phone. It also used to standby my iPhone when I touched certain parts of the screen (NO JOKE)) I thought this was a problem with the jailbreak so I updated to 3.1.3 (knowing that I could put it back down to 3.1.2) to see if it was the jailbreak. Turns out it wasnt the jailbreak I think my 3G is just a little faultly I have had it for over 1 year and it probably doesnt help dropping it in snow and on the ground repeatidly.

Ive tried everything to get the jailbreak again. Everytime I try to put it back down to 3.1.2 it gives me the error '1015' and when I try to jailbreak using custom firmware 3.1.3 I get the error '1064' although the error numbers vary.

So my friend tried to help me out, we restored it to custom firmware 3.1.2 and after getting the error '1015' we ran the blackra1n app. This worked. I had a jailbroken iPhone again. HOWEVER, in doing this, I lost my carrier. I cant make or receive calls. It seems my phone wont activate. Im guessing it has something to do with the custom firmware.