Log In  

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])
P#140762 2024-01-28 19:05 ( Edited 2024-01-28 19:05)

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.

P#140763 2024-01-28 19:13

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.

P#140764 2024-01-28 19:15

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?

P#140767 2024-01-28 19:58

you can also use this technique: https://www.lexaloffle.com/bbs/?tid=42367

P#140768 2024-01-28 20:09

Is the result of print() visible outside of _draw()?

In order for _draw() to be called, _update() or _update60() must be written.

P#140777 2024-01-29 00:23

That worked thanks for all of the help!

P#140779 2024-01-29 01:57

[Please log in to post a comment]