Just so you know, I managed to get *a* flag to appear there, even if it isn't a pirate one. At least I know where the faulty code is.
Now it's just a matter of rewriting it so that it DOES work.
Edit: I do believe I've got it. The game is trying to use index 0, which causes trouble.
Must be something wrong with the formula being used. If I add 1, then it works.
Need to make sure that won't have any other unintended side-effects though.
(BTW: UGH! Why is this all so DIFFICULT????)
Now it's just a matter of rewriting it so that it DOES work.
Edit: I do believe I've got it. The game is trying to use index 0, which causes trouble.
Must be something wrong with the formula being used. If I add 1, then it works.
Need to make sure that won't have any other unintended side-effects though.

(BTW: UGH! Why is this all so DIFFICULT????)