Answer: He stepped on a rattlesnake
The scene where Barf Bag stepped on the rattlesnake was the first scene in the movie. Stanley was told by Mr. Sir, just after he arrived at Camp Green Lake that rattlesnakes wouldn't bother him if he left them alone. Usually. And rattlesnakes wouldn't kill him. Usually.
In the book, however, we were only told of this episode, we didn't witness it, like we did in the movie.