Found some article that says sometimes context menus with over 10 options cause the CLR error. I don't know a thing about C# so here's the article from microsoft forums:
I am posting what I found in case anyone else hits this problem. In my case the problem appears to be related to the context menus. I went through thousands of lines of code and then started deleting the controls one at a time until the error did not occur. Through much trial and error I found that once three of the context menus were eliminated the problem disappeared. The only thing that was different about the context menus that I deleted as compared to the others on the form is that the ones that were deleted had more than ten items on them. I did some experimenting. I started with the original form and deleted the three context menus. I then created three brand new context menus and added ten items to each menu. When I added an 11th item to any menu the CLR error returned.
It took me a long time to get to this and my workaround was to create the context menus programmatically.
So yeah I don't know if this has anything to do with it
Well the person that made this made his last one on a wc3 map so I don't understand the sudden change. The so called 'updated version' that he posted does not work and produces invalid codes. I guess this was supposed to impress us since he made it in C#, originally didn't give us the full thing, and now it doesn't work at all.
meh, i have lots of chars in mind tho. itd take you years. i think i should just find out wut im doing wrong. so far, i run the program, enter in my exact name, char i want... but WC3 says its invalid.
would it be posible to modify deadlychaoses map codegen and make it include rank 12?