MatthieuBonne / CQAutomater

4 stars 1 forks source link

Crashes on new version when selecting new Heroes #80

Closed Vitae666 closed 3 years ago

Vitae666 commented 3 years ago

When I switch to the any of the new heroes I crash with image

THOUGHT I knew why: File Constants.cs line 70 Went from "Sully","Merida","Will","Sagittaria","Jalrok","Raelan","Sylnir","Arathon" to "Sully","Merida","Will","Sagittaria","Jalrok","Raelan","Sylnir","Arathon","Stench","Rumble","Vermin","Reaper", Note the extra comma at the end of the 2nd line

So, I took that out in my build, and nope, didn't work.

Below is the text in the box. Interestingly, it says PranaHeroCombo but it gives the same error when I try to activate Reaper. Woulda thought it would say something about Ascension instead.

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at CQFollowerAutoclaimer.PFStuff.getHeroLevel(String heroName)
   at CQFollowerAutoclaimer.AutoLevel.updateHeroLevels()
   at CQFollowerAutoclaimer.Form1.PranaHeroCombo_SelectedIndexChanged(Object sender, EventArgs e)
   at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
   at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
   at System.Windows.Forms.ComboBox.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************

I don't think you need this extra stuff, right?

Of course, this could just be because the heroes aren't released in the game yet. Dunno :)

MatthieuBonne commented 3 years ago

Of course, this could just be because the heroes aren't released in the game yet. Bingo. I'll add a failsafe !

Vitae666 commented 3 years ago

Kewl. Really thought it was that comma in Constants. Wasn't there and it worked fine before. New build, it's there, boom. But didn't make a diff. See it in other lines and they were always there as well. Coding is weird LOL