A better understanding of {=code}

An example of using the command {=code} in the help section is this:
You look out the window: {=LookOutWindow}

Is the LookOutWindow the name of a command?
I have tried it on a name of a command I created for Quest eg TestRoom but it does not work.


I think LookOutWindow is the name of a function


The = text processor command is a short form of eval.

So the expression inside it can be any Quest expression that returns a string.

This could be the name of a function (in which case () will automatically be added to the end, or anything else that generates a string (for example {=ToWords(player.health) + " HP"}


Thanks mranel and Pertex.
So the word "function" was missing in the help file when it attempted to explain how this command works.
I have not looked at functions yet so I'll return to this =code command later.


The word is probably "expression".

You can use pretty much anything that you could put in a

msg (expression here)

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

Support

Forums