Help with Lists

Hello,
I'm having issues with a list appearing after a player uses a verb. I have an item(object) called "QuestBook" which has several different verbs used to print a list.

DisplayList (inprogress.list, true)

Then I have a changescript that add's quest names to the different lists depending on which of their progress variables are true.

if (meetbubbles.inprogress = true) {
  list add (inprogress.list, "Meat Bubbles")
}
else if (meetbubbles.inprogress = false) {
  list remove (inprogress.list, "Meat Bubbles")
}

and lastly I have a function that takes a quest and checks the current progress. Then sets the progress variables true or false.

if (quest.cancled = true) {
  quest.completed = false
  quest.inpogress = false
}
else if (quest.qstep = (quest.qstepmax + 1)) {
  quest.completed = false
  quest.inpogress = false
  quest.unlocked = false
  quest.pending = false
  quest.done = true
  msg ("You have finished a quest. Well done!<br/>")
}
else if (quest.qstep = quest.qstepmax) {
  quest.inpogress = false
  quest.unlocked = false
  quest.pending = false
  quest.completed = true
  msg ("You have completed a quest. Return to its giver for a reward.<br/>")
}
else if (quest.qstep > 1) {
  quest.unlocked = false
  quest.pending = false
  quest.inpogress = true
  msg ("You have started a new quest.<br/>")
}
else if (player.lvl > quest.lvl) {
  quest.pending = false
  quest.unlocked = true
  msg ("You have unlocked a new quest.<br/>")
}
else if (ListContains(ScopeVisible(), quest)) {
  quest.pending = true
  msg ("You have a new pending quest.<br/>")
}

The problem is that when I display the list only a blank line appears.
Any help would be greatly appreciated.


Can you click on the "Debugger" toolbutton in-game? Click on your "inprogress" object and find its "list" attribute. You should be able to see the all the items in that list. It sounds like the list is empty.

Then the next question is why aren't items being added to that list? Are flags such as "meetbubbles.inprogress" being correctly set?

As an aside, it looks like there is a typo in this line:

if (quest.cancled = true) {      // Should it be "cancelled"?

Also, in that code, there are multiple instances of "quest.inpogress" rather than "quest.inprogress".


It was the missing "R" Thank you so much. - Resolved!


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

Support

Forums