Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error While Trying to Update Houseing Borders in Time Lapse Mode for Housing unlocked while in Time Lapse #27

Open
KeinNiemand opened this issue Sep 2, 2022 · 1 comment · May be fixed by #30

Comments

@KeinNiemand
Copy link

When AT tries to update the border color of housing in Time Lapse/Catching up to Lost Time mode, it fails and I repidetly get this error in the console

buildings.js:81 Uncaught TypeError: Cannot read properties of null (reading 'style')
at buildings.js:81:60
at Array.forEach ()
at buyFoodEfficientHousing (buildings.js:81:21)
at buyBuildings (buildings.js:195:9)
at mainLoop (AutoTrimps2.js:199:13)

What's probably happening is that the GUI elements it's trying to update don't exist while in time lapse mode, so some kind of check needs to be added so AT dosn't try to update borders while in time lapse. The same problem may or may not happen for equipment or any other borders it tries to update.

I've reported the same problem on Zeks version, since both forks have this bug.

@KeinNiemand
Copy link
Author

After some further testing and debugging this error I've found out that this error only happens when a new housing is unlocked while time time lapse/offline mode. While the GUI elements for housing that's already unlocked is already loaded, the UI elements for Newley unlocked housing are undefined if they have been unlocked while in time lapse. This may or may not also be the case for equipment/upgrades/other stuff.

@KeinNiemand KeinNiemand changed the title Error While Trying to Update House Borders in Time Lapse Mode Error While Trying to Update Houseing Borders in Time Lapse Mode for Housing unlocked while in Time Lapse. Sep 2, 2022
@KeinNiemand KeinNiemand changed the title Error While Trying to Update Houseing Borders in Time Lapse Mode for Housing unlocked while in Time Lapse. Error While Trying to Update Houseing Borders in Time Lapse Mode for Housing unlocked while in Time Lapse Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant