EmptyEpsilon icon indicating copy to clipboard operation
EmptyEpsilon copied to clipboard

Issue with log

Open tdelc opened this issue 8 years ago • 1 comments

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.

tdelc avatar Mar 31 '17 20:03 tdelc

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

tdelc avatar Apr 10 '17 19:04 tdelc