michmuch
Regular

hi everyone,
ok i need help because this script drive me insane, so, while working on my mod, this error has been popping since i ve added the amazing shield bashing (by xenoargh). i ve asked on the right thread but this seems too old...
this pops up in game :
"Warning on opcode 1768: invalid agent_id:0; line no: 6:
At script cf_shield_bash"
i ve just copy-paste the script in .py, put the common_shield_bash at the top and in each mission types of mission_templates, and animation code in module_animation. so nothing very hard...
then i ve changed one animation.
and when i press the key for shield bash, the red script error pops up
i ve searched by myself in header_operarions to found OPCODE 1768 = agent_get_animation.
i ve tried to change value to 1 here :
but does nothing at all...
my build_module runs without errors and anim shows fine in game.
maybe i ve put common scripts in wrong place... i ve put them with other common script. But is there an order to load them ?
BTW, in battles against lords, i haven't got this script error. But in battles against bandits or peasants, i' ve got.
However shield bashing works but these warnings are really annoying. Is there a way to desactivate them ?
any suggestions are welcome because i can't understand what's wrong
so thanks you beforehand guys
(sorry for my english)
ok i need help because this script drive me insane, so, while working on my mod, this error has been popping since i ve added the amazing shield bashing (by xenoargh). i ve asked on the right thread but this seems too old...
this pops up in game :
"Warning on opcode 1768: invalid agent_id:0; line no: 6:
At script cf_shield_bash"
插入代码块:
##shield bash begin
("cf_shield_bash",[
(this_or_next|multiplayer_is_server),
(neg|game_in_multiplayer_mode),
(assign, ":already_hit", 0),
(get_player_agent_no,":player_agent"),
(try_begin),
(gt, ":player_agent",0),
(agent_get_animation, ":anim", ":player_agent",0),
(agent_get_horse, ":my_horse", ":player_agent"),
(agent_get_wielded_item, ":shield_item", ":player_agent", 1),
...
i ve just copy-paste the script in .py, put the common_shield_bash at the top and in each mission types of mission_templates, and animation code in module_animation. so nothing very hard...
then i ve changed one animation.
and when i press the key for shield bash, the red script error pops up
i ve searched by myself in header_operarions to found OPCODE 1768 = agent_get_animation.
i ve tried to change value to 1 here :
插入代码块:
(gt, ":player_agent",0),
but does nothing at all...
my build_module runs without errors and anim shows fine in game.
maybe i ve put common scripts in wrong place... i ve put them with other common script. But is there an order to load them ?
BTW, in battles against lords, i haven't got this script error. But in battles against bandits or peasants, i' ve got.
However shield bashing works but these warnings are really annoying. Is there a way to desactivate them ?
any suggestions are welcome because i can't understand what's wrong
so thanks you beforehand guys
(sorry for my english)