Your best bet would be to re-upload your original functions file (backup file) and then try to reapply the hack on a fresh start. The functions file can be picky at times.

To find the line numbers, I'd suggest you use a decent editor such as
EditPlus2 or another of sorts. At all times don't go into your server cp and edit directly from there - that has the potential to produce lots of pesky errors. Familiarize yourself wtih a good text editor and ftp program and hacking will be much easier.