The ratio of people who won the ring toss game to people who lost is 8:5, which means that for every 8 people who won, there were 5 people who lost.
Since 24 people won, there must have been 24 / 8 = 3 groups of 5 people who lost.
So, the total number of people who lost is 3 * 5 = 15 people.
Therefore, if 24 people won the ring toss game at the carnival, 15 people lost.