Help with Quest error

Users who are viewing this thread

I'm getting this error in the game logs when a Quest I've programmed is accepted:
Code:
SCRIPT ERROR ON OPCODE 506: Invalid Quest ID: 312; LINE NO: 3:
At dialog consequence: dlga_town_council_quest:town_politics_pretalk.
At dialog consequence: dlga_town_council_quest:town_politics_pretalk.

The Quest:
Code:
 ("council_campaign", "Convince Powerful Men to Let You Into the Town Council", qf_random_quest,
  "The Mayor of {s10} has hinted that you may be able to join {s10}'s city council, if you can convince either the town's merchants or {s15} that you are fit to do so."
  ),

This is how the Quest is programmed in dialogue:
Code:
    [anyone|plyr,"town_council_quest", [], "It seems I have a little bit of work to do.", "town_politics_pretalk",
                                             [(str_store_party_name_link, s10, "$current_town"),
                                              (party_get_slot, ":quest_target_troop", "$current_town", slot_town_lord),
                                              (str_store_troop_name_link, s15, ":quest_target_troop"),
                                              (quest_set_slot, ":quest_target_troop", "qst_council_campaign", slot_quest_target_troop),
                                              (setup_quest_text,"qst_council_campaign"),
                                              (str_store_string, s2, "@The Mayor of {s10} has hinted that you may be able to join {s10}'s city council, if you can convince either the town's merchants or {s15} that you are fit to do so."),
                                              (call_script, "script_start_quest", "qst_council_campaign", "$g_talk_troop"),
                                              (call_script, "script_report_quest_troop_positions", "qst_council_campaign", ":quest_target_troop", 3),]],
You get the Quest from Mayors in Towns, and the "Quest ID" number from the error message is different depending on which Town/Mayor the Quest is taken from.

The Quest is otherwise accepted as normal, and shows up properly in the quest log. However, when I try to talk to the quest_target_troop, the dialogue option which should show up does not appear. It is programmed like this:
Code:
  [anyone|plyr,"lord_talk",[(check_quest_active,"qst_council_campaign"),
                            (quest_slot_eq, "qst_council_campaign", slot_quest_target_troop, "$g_talk_troop"),
                            ],
   "placeholder text", "lord_town_council_convince",[]],
Considering the Quest looks fine in the quest log (the target_troop reference appears correctly, for example), why does this not work?

I don't know if this is all related to one thing I've done wrong, or if there's more things at play. Any help would be appreciated.
 
Problem solved, turns out the issue was
Code:
 (quest_set_slot, ":quest_target_troop", "qst_council_campaign", slot_quest_target_troop)
when the order of things should have been
Code:
(quest_set_slot, "qst_council_campaign", slot_quest_target_troop, ":quest_target_troop")
. That's what happens when you just copy a quest_slot_eq line and only change the operator, but not the order of what follows it. :mrgreen:
 
Back
Top Bottom