View Single Post
Super Moderator
Status: Offline
Posts: 249
Join Date: Dec 2012
Location: Frosno, Ca
Default 12-30-2016, 12:44 AM

Originally Posted by BadWolfGeronimo View Post
This may be a simple fix because I've read a bunch of bottles posts and can't find this problem. My countdown and loop works great except when the text pops up in the bubbles after the first iteration it just keeps adding the numbers in front of one another;

"96979899 bottles of beer on the wall."

What did I do wrong?
It is hard to say without seeing the program. If you have two variables, an integer for the count and a string for the display, then I would guess that the new string with the current number is being concatenated (added to) the front of the string variable rather than replacing it.
You need to either do an assignment rather than a concatenation, or ensure the variable holding the 'number' string is set to "" at the start of each loop.


Mark Henwood
Reply With Quote