I'm going through the "Programming 2D Scrolling Games" book. The free PDF download.
I'm noticing that for the past several example programs, it's opening with:
Code: Select all
If InitSprite()=0 Or InitKeyboard()=0 Or OpenScreen(640,480,16,"Input Test")=0
MessageRequester("Error!", "Unable to Initialize Environment", #PB_MessageRequester_OK)
End
EndIf
Problem is, every time I run the provided code, it gives me the pop up window saying "Unable to Initialize Environment" because one or more of the conditions hasn't been met. For sure, I know sprites haven't been initialized. At first, I thought maybe the point wasn't that the code work, but that I get to see an example of the subject. But, seeing that it's the same situation with every example code provided, I'm thinking something's off somewhere. Every other programming book, tutorial or video I've ever seen, you're encouraged to type out the code to get you used to the process, and seeing the results. In this case, the results would always be "Unable to Initialize...", defeating the purpose of the lesson.
Is this something that PB is more strict about in more recent versions, but was permissible when the book was written?
I don't know how useful this book is going to be to me (or anyone, really) if the code samples don't work.
Can someone shed some light on this? Should I not be using this book at this point?
Thanks