Okay this is a hard situation for me to describe. I have a 3GS with 3.1.3, well had. It was jailbroke. I was going to take it to the apple store today to get the screen fixed (some dead pixels or something, doesn't concern my problem) when I restored the iphone it gave me an error and wouldnt update. When I try to update it, itunes will automatically download 3.1.3 but then tell me that it isnt eligible for my build, when I try 4.0 it just gives me an error 13. Ive tried my laptop, my computer and a friends computer and several different USB ports. I'm out of ideas. Help please?