[User Error] Issues with ZONE()

EDIT: After looking at the browser console (F12) I see:

"The 'desc' function caused an error (_util.js:366)"
"this.zoneDescs is not iterable (_world.js:359
"TypeError: this.zoneDescs is not iterablr
at ZONE.res.desc (zone.js:120:25)
at Object.initItem (_world.js:350:30)
at Object.init (_world.js:253:13
at HTMLScriptElement.scriptOnLoad (_settings.js:211:13)"

I just don't really know what it all means and could use some guidance

I'm building the barebones of a text adventure using QuestJS. I love it so far and it's been a fun sandbox to learn JS.
So far, I've constructed locations that link together, but when I try to add a ZONE(), the code stops working.

  • I made sure the settings.libraries.push('zone') file was added to settings.js, saved, launched the game no problem.
  • I added the simple createRoom [below] as shown on the wiki- nothing fancy, saved, game won't launch.
  • When I remove the ZONE() keyword then save, the game loads no problem.
  • I attempted to add coordinates to the player item, to no effect [and have since removed them to not mess up the code].
>createRoom("forest", ZONE(), {
  descs:[
    {
      desc:'The thick canopy blocks out most of the sunlight.'
    },
  ],
})

So it seems I'm just having an issue with ZONE() specifically. Am I missing something? Is there another dependency I need to add? I'll admit, I'm building this "trial game" in layers, so I thought I'd get all the locations down before doing other things, so I WAS skipping around the wiki just a little.


Did I post this in the wrong place? No one seems to have any advice thus far, yet other posts have plenty of activity?


It seems like we are all waiting for the generousity of one person to help, mrangel
Which is why i wrote a small guide
https://textadventures.co.uk/forum/samples/topic/3zqfeufaeu6vclcpotr8xa/k04-guide-to-solving-simple-coding-problems-from-quest-app-2024
But it does not contains QuestJS, hopefully when you become good at it, you can share some tips on how to find solution too to help future people


I'll take a look at that, thank you!

It's daunting, but I'm working around this section for now and will return when I have more knowledge about QuestJS as a whole. Hopefully someone knows what's happening, as I'm excited to learn more about JS in general.


I mean mrangel might be busy in real life, you can continue learn about QuestJS while waiting,
not much point waiting here, you can come back every few days to check for replies


Did I post this in the wrong place? No one seems to have any advice thus far, yet other posts have plenty of activity?

Posts about the various JS engines derived from Quest (QuestKit, QuestJS, Quest6, and I'm sure there's been at least one other abandoned project along those lines) usually go in the QuestKit forum (which would probably have been renamed a while ago if anybody knew how to do that).

I'm afraid I can't help much here; I'm not familiar with this particular engine. I had a quick look through the code, and I can't figure out where the zoneDescs attribute is supposed to be set. I find myself wondering if…

just a minute…
(goes to browse through previous versions of zone.js)

Yeah… looks like the attribute descs has been renamed to zoneDescs in the code, but the documentation hasn't been updated to match, unless I'm seeing an old version or something.


That was it, thank you very much! The zoneDescs worked perfectly.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums