EmptyEpsilon
EmptyEpsilon copied to clipboard
Issue with log
Hi,
I have a problem with the log screen. Every 3 minutes, I update the log with direction for some stations and planets. My problem is that after 30 minutes (I think when the log screen is full), the update does not work anymore. I have to quit and reopen the log screen or the relay to display the newer infos. And after that, there is no more update.
I check the code but I don't understand where the problem could be.
I understand the problem. When I try to put several addToShipLog at same time, it could fail if the max size of the log is reached (here 100). I say "could" because for 3 addToShipLog at same time, there is no problem.
Unfortunately I can't understand where is the issue in the code. I will update my code.
Code which fail :
timer_log = timer_log + delta if timer_log >= 10 then timer_log = 0 player:addToShipLog("test", "white","extern") player:addToShipLog("test", "white","extern") player:addToShipLog("test", "white","extern") player:addToShipLog("test", "white","extern") end
Code which is ok :
timer_log = timer_log + delta if timer_log >= 10 then timer_log = 0 player:addToShipLog("test", "white","extern") end
Or
timer_log = timer_log + delta if timer_log >= 10 then timer_log = 0 player:addToShipLog("test", "white","extern") player:addToShipLog("test", "white","extern") player:addToShipLog("test", "white","extern") end