Page 1 of 1

[ignore] flush .print("")

Posted: Tue Jan 19, 2016 8:27 pm
by matjojo
Currently there is no way to flush the game.player.print function as far as I know, I have a piece of code that is very very heavy to run. It takes a good 5 minutes sometimes. Now I want to print a message, saying that the game WILL come back and is not broken. but with or without \n I can't get the game to flush the print function. Am I missing something or is there no flush like function?

Re: [request] flush .print("")

Posted: Tue Jan 19, 2016 10:35 pm
by orzelek
I would assume that one way would be to print the message first then run the job on next tick.

Re: [request] flush .print("")

Posted: Wed Jan 20, 2016 9:31 am
by ratchetfreak
or you should split the heavy function up in several chunks that you can spread over multiple ticks

So you don't have to stop the world to do your calc

Re: [ignore] flush .print("")

Posted: Wed Jan 20, 2016 1:30 pm
by matjojo
ratchetfreak wrote:or you should split the heavy function up in several chunks that you can spread over multiple ticks

So you don't have to stop the world to do your calc
orzelek wrote:I would assume that one way would be to print the message first then run the job on next tick.


alright, I took a look at my code and realised that just like you said, It can only print when the next tick happens, I'll edit the name of the topic to delete, so you guys know it is not necessary, but a mistake on my side.