• Please note that we've updated the Mount & Blade II: Bannerlord save file system which requires you to take certain steps in order for your save files to be compatible with e1.7.1 and any later updates. You can find the instructions here.

process_operations error in buildmodule

Users who are viewing this thread

Malik Faris

Squire
M&BWBWF&SNW
Hmm, i get this error when running build module.... and i dont know what to do with it:
Code:
  else:
    lenstatement = 0
  ofile.write("%d %d "%(opcode, lenstatement))
  for i in xrange(lenstatement):
    operand = process_param(statement[i + 1],variable_list,variable_uses,local_vars_list,local_var_uses,tag_uses,quick_strings)
    ofile.write("%d "%operand)

i haven't changed anything in processes, but i did add this to game menus:
("action_change_troops",[(eq, "$players_kingdom_name_set", 1),],"Change your kingdom's default troops.",
      [(jump_to_menu, "mnu_camp_action_change_troops"),
        ]
      ),
("camp_action_change_troops",0,
  "Which faction?",
  "none",
  [],
    [
      ("Swadian",[],"Swadian.",
      [(faction_set_slot, "fac_player_supporters_faction",  slot_faction_tier_1_troop, "trp_swadian_recruit"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_tier_2_troop, "trp_swadian_militia"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_tier_3_troop, "trp_swadian_footman"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_tier_4_troop, "trp_swadian_infantry"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_tier_5_troop, "trp_swadian_knight"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_a, "pt_kingdom_1_reinforcements_a"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_1_reinforcements_b"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_c, "pt_kingdom_1_reinforcements_c"),
      (jump_to_menu, "mnu_camp"),
        ]
      ),
   
      ("Vaegir",[],"Vaegir.",
      [(faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_1_troop, "trp_vaegir_recruit"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_2_troop, "trp_vaegir_footman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_3_troop, "trp_vaegir_veteran"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_4_troop, "trp_vaegir_infantry"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_5_troop, "trp_vaegir_knight"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_a, "pt_kingdom_2_reinforcements_a"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_2_reinforcements_b"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_c, "pt_kingdom_2_reinforcements_c"),
      (jump_to_menu, "mnu_camp"),
        ]
      ),
     
      ("Khergit",[],"Khergit.",
      [(faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_1_troop, "trp_khergit_tribesman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_2_troop, "trp_khergit_skirmisher"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_3_troop, "trp_khergit_horseman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_4_troop, "trp_khergit_horse_archer"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_5_troop, "trp_khergit_veteran_horse_archer"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_a, "pt_kingdom_3_reinforcements_a"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_3_reinforcements_b"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_c, "pt_kingdom_3_reinforcements_c"),
      (jump_to_menu, "mnu_camp"),
        ]
      ),
   
      ("Nord",[],"Nord.",
      [(faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_1_troop, "trp_nord_recruit"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_2_troop, "trp_nord_footman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_3_troop, "trp_nord_trained_footman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_4_troop, "trp_nord_warrior"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_5_troop, "trp_nord_veteran"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_a, "pt_kingdom_4_reinforcements_a"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_4_reinforcements_b"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_c, "pt_kingdom_4_reinforcements_c"),
      (jump_to_menu, "mnu_camp"),
        ]
      ),
   
      ("Rhodok",[],"Rhodok.",
      [(faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_1_troop, "trp_rhodok_tribesman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_2_troop, "trp_rhodok_spearman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_3_troop, "trp_rhodok_trained_spearman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_4_troop, "trp_rhodok_veteran_spearman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_5_troop, "trp_rhodok_sergeant"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_a, "pt_kingdom_5_reinforcements_a"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_5_reinforcements_b"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_c, "pt_kingdom_5_reinforcements_c"),
      (jump_to_menu, "mnu_camp"),
        ]
      ),
   
      ("Sarranid",[],"Sarranid.",
      [(faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_1_troop, "trp_sarranid_recruit"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_2_troop, "trp_sarranid_footman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_3_troop, "trp_sarranid_archer"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_4_troop, "trp_sarranid_horseman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_5_troop, "trp_sarranid_mamluke"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_a, "pt_kingdom_6_reinforcements_a"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_6_reinforcements_b"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_c, "pt_kingdom_6_reinforcements_c"),
      (jump_to_menu, "mnu_camp"),
        ]
      ),
      ("Player Faction",[],"Player Faction.",
      [(faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_1_troop, "trp_player_recruit"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_2_troop, "trp_player_footman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_3_troop, "trp_player_crossbowman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_4_troop, "trp_player_lightcavalry"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_5_troop, "trp_player_veteranheavycavalry"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_a, "pt_player_supporters_faction_reinforcements_a"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_player_supporters_faction_reinforcements_b"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_c, "pt_player_supporters_faction_reinforcements_c"),

      (jump_to_menu, "mnu_camp"),
        ]
      ),
      ("Order of the Leopard",[],"Order of the Leopard.",
      [(faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_1_troop, "trp_leopard_zealot"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_2_troop, "trp_leopard_footman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_3_troop, "trp_leopard_vet_crossbowman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_4_troop, "trp_leopard_pikeman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_5_troop, "trp_leopard_knight"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_a, "pt_kingdom_7_reinforcements_a"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_7_reinforcements_b"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_c, "pt_kingdom_7_reinforcements_c"),

      (jump_to_menu, "mnu_camp"),
        ]
      ),
      ("Order of the Bear",[],"Order of the Bear.",
      [(faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_1_troop, "trp_bear_zealot"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_2_troop, "trp_bear_footman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_3_troop, "trp_bear_vet_crossbowman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_4_troop, "trp_bear_pikeman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_5_troop, "trp_bear_knight"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_a, "pt_kingdom_8_reinforcements_a"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_8_reinforcements_b"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_c, "pt_kingdom_8_reinforcements_c"),

      (jump_to_menu, "mnu_camp"),
        ]
      ),
      ("Order of the Lion",[],"Order of the Lion.",
      [(faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_1_troop, "trp_lion_zealot"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_2_troop, "trp_lion_footman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_3_troop, "trp_lion_vet_crossbowman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_4_troop, "trp_lion_pikeman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_5_troop, "trp_lion_knight"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_a, "pt_kingdom_9_reinforcements_a"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_9_reinforcements_b"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_c, "pt_kingdom_9_reinforcements_c"),

      (jump_to_menu, "mnu_camp"),
        ]
      ),
      ("Foreigners",[],"Foreigners.",
      [(faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_1_troop, "trp_foreign_samurai"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_2_troop, "trp_foreign_samurai_archer"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_3_troop, "trp_foreign_samurai_mounted"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_a, "pt_kingdom_10_reinforcements_a"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_10_reinforcements_b"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_c, "pt_kingdom_10_reinforcements_c"),

      (jump_to_menu, "mnu_camp"),
        ]
      ),
      ("Order of the Wolf",[],"Order of the Wolf.",
      [(faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_1_troop, "trp_wolf_zealot"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_2_troop, "trp_wolf_footman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_3_troop, "trp_wolf_vet_crossbowman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_4_troop, "trp_wolf_pikeman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_5_troop, "trp_wolf_knight"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_a, "pt_kingdom_11_reinforcements_a"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_11_reinforcements_b"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_c, "pt_kingdom_11_reinforcements_c"),

      (jump_to_menu, "mnu_camp"),
        ]
      ),
      ("Order of the Raven",[],"Order of the Raven.",
      [(faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_1_troop, "trp_raven_zealot"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_2_troop, "trp_raven_footman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_3_troop, "trp_raven_vet_crossbowman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_4_troop, "trp_raven_pikeman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_5_troop, "trp_raven_knight"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_a, "pt_kingdom_12_reinforcements_a"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_12_reinforcements_b"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_c, "pt_kingdom_12_reinforcements_c"),

      (jump_to_menu, "mnu_camp"),
        ]
      ),
      ("Order of the Eagle",[],"Order of the Eagle.",
      [(faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_1_troop, "trp_eagle_zealot"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_2_troop, "trp_eagle_footman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_3_troop, "trp_eagle_vet_crossbowman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_4_troop, "trp_eagle_pikeman"),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_5_troop, "trp_eagle_knight"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_a, "pt_kingdom_13_reinforcements_a"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_b, "pt_kingdom_13_reinforcements_b"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_reinforcements_c, "pt_kingdom_13_reinforcements_c"),

      (jump_to_menu, "mnu_camp"),
        ]
      ),

   
      ("cancel",[],"Cancel.",
      [(jump_to_menu, "mnu_camp"),
        ]
      ),
 

Somebody

Code Pope
Baron
WBWF&S
Open up menus.txt - you will see two types of references - mnu (menu) and mno (menu option). The former is also used within the module system in jump_to_menu, and the latter is probably not accessible. You have placed a full menu inside another menu's options block, which is invalid.
 
Top Bottom