Stevenson forewarns the readers that Jim's fantasies will turn tragic by using foreshadowing. A device used in literature to give hints to the reader about events that will occur later in the story. In chapter 7, adult Jim tells the reader:
Sometimes the isle was thick with savages, with whom we fought; sometimes full of dangerous animals that hunted us; but in all my fancies nothing occurred to me so strange and tragic as our actual adventures.
This quotation literally states that nothing that Jim expected to happen was as "strange and tragic" as what actually happened. The reader now knows that the events will be tragic, but since they are also strange, the reader will have a hard time figuring out what events are going to lead to Jim's fantasies turning tragic. This line creates suspense for the reader who will try to predict the outcome.