Thread:FixSRwiki/@comment-46261745-20200905103950/@comment-46261745-20200917200913

Sorry, I was mainly just posting out of frustration than out of any expectation from you. I hadn't really done much investigation at that point either, so I thought I'd be able to fix it with some detective work...

I've been trying different approaches to figure out why the error is getting thrown, and although I haven't figured out why... I have learned a few things:

a) the error message is indicating that an array somewhere is being given an out of bonds index value (error message: https://files.catbox.moe/6lsnut.png)

b) I know that it gets to the lines where it says "return n行動１" in the main function, and it does not get back to the function it returned it to, or else the error occurs right on the call line "n行動 = 合戦敵_行動選択_hardmode(n武将番号);". This is puzzling though, since...

c) ... the values for the n行動１ variable at that point are correct. I'm getting 21 for ally guard right before it's returned from a MsgBox, right before it throws the error. This is the same value being retrned by the original fnction to an assignment ot the same variable

d) It appears to affect other Skill set 1 moves, not just ally guard. I got it to trigger when a tactician was trying to buff allies. - I'm going to try this angle a bit more to see if I can discover anything new with other Skill set 1 moves. This is also showing that the error can be triggered withot even using one of my new functions other than the main one... so the new secondary functions don't seem to be the issue

e) It doesn't occur when I compile all files except my new AI (not particularly surprising, but I was wondering if it occured because of the new lure/bloodlust skill parameters that I had to make with Nunuhara's tool, that also assign graphics in the same way as ally guard, but this doesn't appear to be the case)

I'm still very confused... either another function somewhere is running when the AI returns the move to the parent function, and I can't get visibility on how it's triggered, or something thatran previouslyy is somehow stitll in play - but if it's affecting multiple n行動１ moves, but not other skill sets, then this is also unlikely... so I'm not really suure what to do next...