Hi and Welcome. My Name is ***** ***** I look forward to assisting you today with your question.
That error indicates your Mac is unable to boot the system files from Apple's servers (via Internet) since you erased the system files of internal hard drive/SSD. You shouldn't have erased the recovery HD.
So first of all, I'd recommend to connect the Mac to another WiFi network or to router via Ethernet cable, then restart and try to boot into Internet Recovery by holding Command, Option and R keys. If that didn't work, then restart and immediately hold down Option key and select Recovery HD if you see it.
If it still giving you error, then there are only two ways to fix it.
First option is, If you get another Mac and USB flash drive, then you can download the latest OS X or macOS from App Store, then create a USB OS X Installer drive using this application--> http://diskmakerx.com/
Then put it on your Mac, restart and hold down Option key and this will boot into Startup Manager.Select OS X USB drive you created and press return. This will boot into that USB drive and you can reinstall OS X without getting that error.
Second option is, you can buy the macOS 10.12 version USB drive from eBay and use it to reinstall OS X. See here--> http://www.ebay.com/itm/New-OS-X-RECOVERY-USB-10-12-10-11-10-10-10-9-10-8-10-7-10-6-Sierra-El-Capitan-/301923921250?var=&hash=item464c116d62:m:mLlosdI3cc62uoGzVHKykuw
Both of these methods doesn't require internet to reinstall OS X and thus it will work 100% without getting that error. These are your only option to solve this problem.
If you have any questions or would like any additional information, please don't hesitate to ask.
If you are not satisfied with the service I provided, please don't rate me bad or poor or OK. You don't have to rate anything if you are not satisfied. You can close this page without rating and ignore the rating request from this site.