WB Code faux ?

正在查看此主题的用户

chrono95

Sergeant
Hello, je fais appel a vous car j'ai un probléme avec ce code :

http://forums.taleworlds.com/index.php/topic,218883.0.html

插入代码块:
  #script_get_weapon_details
  ("get_weapon_details", [
    (store_script_param, ":item", 1),
	
	(assign, reg1, -1),
	(assign, reg2, -1),
	(assign, reg3, -1),
	(assign, reg4, -1),
	(assign, reg5, -1),
	(assign, reg6, -1),
	(item_get_type, ":type", ":item"),
	(try_begin),
	  (eq, ":type", itp_type_crossbow),        # You can split these item types up into separate (else_try) blocks if you want to have more control over the individual item types
	  (assign, reg1, "anim_ready_crossbow"),   # Replace this with the aiming animation of your choice
	  (assign, reg2, "anim_release_crossbow"), # Replace this with the firing animation of your choice
	  (assign, reg3, "anim_reload_crossbow"),  # Replace this with the reloading animation of your choice
	  (assign, reg4, "itm_bolts"),             # Replace this with whatever ammo you want (item type must be bolts for crossbow, bullets for pistol)
	  (assign, reg5, "snd_pistol_shot"),       # Replace this with sounds from your mod
	  (assign, reg6, wpt_crossbow),
	(else_try),
	  (eq, ":type", itp_type_pistol),
	  (assign, reg1, "anim_ready_pistol"),     # Same as the above, but for pistols
	  (assign, reg2, "anim_release_pistol"),
	  (assign, reg3, "anim_reload_pistol"),
	  (assign, reg4, "itm_cartridges"),
	  (assign, reg5, "snd_pistol_shot"),
	  (assign, reg6, wpt_firearm),
	(try_end),
   ]),

###
#################################################################################################################################################
#################################################################################################################################################

Message d'erreur :  ("get_weapon_details", [
                          ^
Identification Error: unexpected indent


 
indentation inattendue... Je vois moyennement. (l'indentation, si je me trompe pas, c'est les "alinéas" du code)
Tu as bien installé WSE ?
 
peut étre , et je dit bien peut étre , ...
en python, 3 espace ou tab , étant le moyen de délimiter un block d'instruction(s),
il se peut donc que ta premiére ligne n'ai pas besoin d'espace au debut .
 
后退
顶部 底部