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

runForest() not working anymore #7

Open
JensPanis opened this issue May 12, 2023 · 1 comment
Open

runForest() not working anymore #7

JensPanis opened this issue May 12, 2023 · 1 comment

Comments

@JensPanis
Copy link

JensPanis commented May 12, 2023

`PS C:\dev\the-forest-main> npm run start

[email protected] start
tsc -b && node dist/index.js

connecting to suY2OoD5EMoWb6X7\eplorationDays
connected? true
doing regrowth
C:\dev\the-forest-main\dist\index.js:162
for (var _key in game.partialMaps[MAP_ID].objects) {
^

TypeError: Cannot read properties of undefined (reading 'objects')
at Timeout._onTimeout (C:\dev\the-forest-main\dist\index.js:162:51)
at listOnTimeout (node:internal/timers:564:17)
at process.processTimers (node:internal/timers:507:7)

Node.js v19.0.0`

			$case: "mapSetObjects",
			mapSetObjects: {
				mapId: MAP_ID,
				objects: {
					[treeId]: {
						type: 0,
						normal: BLANK,
						customState: "hole",
						_tags: [], // smh we're going to hopefully get rid of this soon but for now you just have to include it with setObject actions, sorry
					},
				},
			},
		});```
@npfoss
Copy link
Contributor

npfoss commented Jul 11, 2023

sounds like you didn't run the setup, so there are no objects to start with, and game.partialMaps[MAP_ID].objects is undefined

(sorry for the delay! The API is kind of on the backburner for now)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants