I made a table with some values and then printed it with the draw function but it just doesnt print anything. There is nothing that gets printed onto my screen whenever I run the game. How do i fix this? code:
star={1,2,6,10,98}
print(star[1])
You might need to post more of the surrounding code - as written, this code by itself prints 1 when I run it. If you're not seeing anything, my best guesses would be either that this code is not being run at all, or it is being run but there's a CLS() somewhere after the print happens which is clearing it from the screen.
That print stuff is at the end of the _draw() function and there is no cls() after it. There is nothing in the code that would interfere with the star table printing.
try adding x,y coordinates to the print for testing, like print(star[1],64,64,8)
, maybe it's printing offscreen for some reason, or printing the same color as whatever it's printing on top of?
you can also use this technique: https://www.lexaloffle.com/bbs/?tid=42367
Is the result of print()
visible outside of _draw()
?
In order for _draw()
to be called, _update()
or _update60()
must be written.
[Please log in to post a comment]