I'm sorry nothing worked, I've offered all the advice I can think of.
Let me just say, if you're new to scripting and ROM hacking in general, then WELCOME TO HELL. This type of glitchy, explainable ******** is common. Be thankful you didn't start out on G/S/C, and good luck not punching your keyboard into oblivion. One day you'll get the hang of it.