Formatobjectlist
itc2016
20 Aug 2017, 15:06Hi.
I used to use an older version of quest where this code worked, now it's got errors.
I was just hoping to get a handle on this as I'm not sure how to go about it.
The earlier was code
formatObjectList("you can see",player.parent, "and" ,"in this room.",false)
Help!:)

K.V.
20 Aug 2017, 16:07Hello,
It may just be the lower case f
that's throwing things off, but here's how to find the default function. From here you can click 'copy' and change the default settings, too, if you'd like to do that.
itc2016
20 Aug 2017, 16:59Thank you
But I'm at a total loss at what to do
Before I could just print an expression to list objects, I'm sure I'm missing something obvious but I don't know

K.V.
20 Aug 2017, 17:14http://docs.textadventures.co.uk/quest/functions/corelibrary/formatobjectlist.html
That says to do it exactly like you've written it, but I get:
Error running script: Too many parameters passed to FormatObjectList function - 5 passed, but only 4 expected
Hrmm...

K.V.
20 Aug 2017, 17:26This is the line where look
calls it:
FormatObjectList(game.pov.parent.objectslistprefix, GetNonTransparentParent(game.pov.parent), Template("And"), ".")
That doesn't print anything at all when I plug it into a function and call it with a command.
Are you wanting to be able to change what it says on-the-fly?
If you just want to print the room description, ShowRoomDescription
will do the same as when the player enters LOOK.

K.V.
20 Aug 2017, 17:56Ha! Got it!
I made a command called new look
.
Script:
variable = FormatObjectList ("Check it out! There's ", GetNonTransparentParent(game.pov.parent), Template("And"), "!")
msg (variable)
Output
> look
You are in a room.
You can see a thing and a widget.
> new look
Check it out! There's a thing and a widget!

K.V.
20 Aug 2017, 17:59gollum = FormatObjectList ("Yesss, Precious! We sees ", GetNonTransparentParent(game.pov.parent), "and we sees", "!")
msg (gollum)
> new look
Yesss, Precious! We sees a thing and we sees a widget!
itc2016
20 Aug 2017, 18:16Lol.
Thank you for showing me the preciousness

K.V.
20 Aug 2017, 18:26Lol.
Thank you for showing me the preciousness
👍 K.V. likes this.
No... Thank you !
I hadn't even thought of using something like this!