Text processor

Anyone understand why the below 'eval' code doesn't work in a room description text box? Does it not work with Quest 5.7?

{once:Room description}
{eval:PrintCentered ("insert centred message")}
{notfirst:Other room description}

The way the text processor works is to convert the string with the directives into a new string, and then that gets printed. The eval directive is expecting some Quest code that will result in a string.

The PrintCentered prints the text - which you do not want at this point - but does not return anything, so cannot be used with eval.


Hi Pixie, thanks for your explanation. I've ended up just plugging the whole thing into a script, despite it looking a bit more messy.

Is there any chance you could also help with my issue re terminating a conversation topic in convlib. I posted the question earlier today. Essentially I just need to exit a menu, but can't find the right piece of code. Would be very appreciative!


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

Support

Forums