Formatobjectlist

Hi.
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.

Hello,

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.

image


Thank 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.

http://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.

This 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.

Ha! 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.
gollum = 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!


Lol.
Thank you for showing me the preciousness


K.V.

Lol.
Thank you for showing me the preciousness

šŸ‘ K.V. likes this.


No... Thank you !

I hadn't even thought of using something like this!


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

Support

Forums