Ebook Coder

What's wrong with the following array reading function?