Here is the description of that error:
Error 1015: This error is typically caused by attempts to downgrade the iPhone, iPad, or iPod touch's software. This can occur when you attempt to restore using an older .ipsw file. Downgrading to a previous version is not supported. To resolve this issue, attempt to restore with the latest iPhone, iPad, or iPod touch software available from Apple. This error can also occur when an unauthorized modification of the iOS has occurred and you are now trying to restore to an authorized, default state.
from here http://support.apple.com/kb/TS3694
The latest level for the iPhone 3G is iOS 4.2.1. Don't attempt to update using an .ipsw file from anywhere but Apple through iTunes.