Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.
In the code for Font_Test that's a rather poor use of classes, and the "begin ... end" statement certainly wasn't used to create a loop, as I mentioned above. The following would look better:
Code:
module Font_Test
Font.default_name = "Rod"
Font.default_size = 15
end
But even with this, a module is useless without methods in any case.
Don't say it's a poor fix if it works a 100% of the time with no bugs. Thanks poccil I didn't know "begin" could be used in conjuction with a 'while'. I should have known Ruby had more ways of looping.
Rofl don't make fun. That while is within the loop. The while loop he created was by placing the while on the same line as the end. Kind of like a do while loop in C.