Class change when change weapon type.

Hello Everyone,


This is my first script that I have been making.
I haven't done any coding before.


Took me quite a while to make this work.


Below is my script of changing the class of your actor when you equip a different weapon type.


Please note this is not when you change a weapon but when the weapon type changes.


I need help completing the script.


The script seems to long and I think I may have done this the long way.


If anyone can shorten things that would be great.


http://pastebin.com/Seu33LCV
Hey Jeremy,


Not sure if you're still supporting this, but I'm a bit stuck on implementing this. Whenever I run this with my classes/weapon types set up I get this error back. I was wondering if you had any insight on this?

2016-09-16 14_41_52-Project Bersona.png
That was my first ever script, I am sure there is some errors. I will have to take a look at the entire script and probably rewrite it now that I know a lot more.
I am not really active anymore. I am getting back in to programming though so I am going through everything.


Hmm, I can't find anything wrong using the script. 
Make sure that the class that you are changing into has access the weapon you are equipping. 


Edit: Edited as of 10/9/2016 and put pastebin link into the description.

Original thread: https://forums.rpgmakerweb.com/threads/class-change-when-change-weapon-type.47051/