Hello there, I've been making a Rom hack of Pokemon Ultra Sun and I've run into an issue. I've looked around on the forums and I haven't been able to find a similar issue, but if there already is sorry for asking.
In short, every time I try to open static encounters, I run into an error message. Here is the message.
Exception Details:
System.ArgumentOutOfRangeException: InvalidArgument=Value of '65535' is not valid for 'SelectedIndex'.
Parameter name: SelectedIndex
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at pk3DS.Main.<B_Static_Click>b__60_0() in C:\BuildAgent\work\ccf72a59f9911202\pk3DS\Main.cs:line 1126
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Loaded Assemblies:
--------------------
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll
pk3DS, Version=1.0.0.402, Culture=neutral, PublicKeyToken=null
C:\Users\Omikaye\Desktop\Ultra Sun Rom Hack\pk3ds epic\pk3DS.exe
System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll
System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll
System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll
System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll
System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll
System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll
pk3DS.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
C:\Users\Omikaye\Desktop\Ultra Sun Rom Hack\pk3ds epic\pk3DS.Core.dll
--------------------
User Message:
An unhandled exception has occurred.
The program must now close.
I have tried to fix the problem myself with no progress.
I've tried grabbing a new rom and starting from scratch in case it was any of the edits I made, but even on a fresh rom, it crashes and gives the same error.
I've also tried opening pk3ds in Visual Studio, but I'm not good enough at coding to find out why there is a problem with SelectedIndex finding a value of 65535.
Even when I try to use a different rom, (say X or Omega Ruby) static encounters still crashes and gives the same message.
If possible, I'd really appreciate any help I can get, as my hack wouldn't be complete if I couldn't edit Totem Pokemon. Thanks in advance!