QuestLog.GetQuestEntry problem

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
bluebuttongames
Posts: 91
Joined: Tue Jul 14, 2015 8:22 am

QuestLog.GetQuestEntry problem

Post by bluebuttongames »

Hi there,

In my code I'm using QuestLog.GetQuestEntry for a string but I'm getting:

[lua(Variable["track_smallrabbits"])]/3 Small Rabbits killed back rather than the correct live variable string that's displayed in the quest tracker.

Any way I can get around this?

Thanks,

BB
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: QuestLog.GetQuestEntry problem

Post by Tony Li »

Hi,

Run it through FormattedText.ParseCode. For example:

Code: Select all

string s = FormattedText.ParseCode(QuestLog.GetQuestEntry("Your Quest", 1));
The ParseCode function replaces [lua(code)] and [var=varName] tags with their runtime values.

BTW, you can simplify your entry to this:

Code: Select all

[var=track_smallrabbits]/3 Small Rabbits Killed
The shorter syntax may make it easier to identify typos.
bluebuttongames
Posts: 91
Joined: Tue Jul 14, 2015 8:22 am

Re: QuestLog.GetQuestEntry problem

Post by bluebuttongames »

Thanks Tony!
Post Reply