Revital, r17 is showing up not an error code, it is telling you how many images you can take before the buffer fills up in a burst of shots according to Nikon forums.
Check the attached link,instruction and guide, not your exact Model # but lots of info.on problem your experiencing, Good luck.
I hope this helped you out, if so let me know by pressing the helpful button.
https://www.flickr.com/groups/756291@N24/discuss/72157626649597079/