Hi I took a quick look at the contents of the RAR, but I can’t make heads or tails of it. There is NO indentation at all, everything is aligned left. Is this on purpose? Whatever the case, it makes the code way too hard to read.
Also, I noticed that you’ve got a function,
function gengame(num\_lvl) ... end
and in this function you create a bunch of other (global) functions. This just isn’t going to work. I mean it could work but it would be so prone to error that I’d suggest again doing this:
-
Start over.
-
Write individual functions, no functions in functions.
-
Use forward declaration (as shown above) to provide access to functions that need to be called in other functions.
-
Reduce as much as possible.
I think if you do this, the problem will either go away or be much easier to find.
That’s the best I can do for you.