kwsch / pkNX

Pokémon (Nintendo Switch) ROM Editor & Randomizer
https://projectpokemon.org/home/forums/topic/48647-pknx-nintendo-switch-rom-editor-randomizer/
GNU General Public License v3.0
362 stars 108 forks source link

New common/script saving issue #364

Closed Isol8iv closed 8 months ago

Isol8iv commented 8 months ago

Following on from issue #343, which is closed. Saving changes in common/script for SwSh now gives this error:

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

** Exception Text ** System.ArgumentException: Variable parse error: 0000. Expected a hexadecimal value or standard variable code. at pkNX.Structures.TextConfig.GetVariableNumber(String variable) in D:\a\1\s\pkNX.Structures\Text\TextConfig.cs:line 34 at pkNX.Structures.TextFile.GetVariableParameters(ReadOnlySpan1 text) in D:\a\1\s\pkNX.Structures\Text\TextFile.cs:line 415 at pkNX.Structures.TextFile.GetVariableValues(ReadOnlySpan1 variable) in D:\a\1\s\pkNX.Structures\Text\TextFile.cs:line 378 at pkNX.Structures.TextFile.GetLineData(ReadOnlySpan1 line) in D:\a\1\s\pkNX.Structures\Text\TextFile.cs:line 200 at pkNX.Structures.TextFile.ConvertLinesToData(String[] value) in D:\a\1\s\pkNX.Structures\Text\TextFile.cs:line 160 at pkNX.Structures.TextFile.set_Lines(String[] value) in D:\a\1\s\pkNX.Structures\Text\TextFile.cs:line 148 at pkNX.Structures.TextFile..ctor(IEnumerable1 lines, TextConfig config, Boolean remapChars) in D:\a\1\s\pkNX.Structures\Text\TextFile.cs:line 47 at pkNX.Structures.TextFile.GetBytes(IEnumerable1 lines, TextConfig config, Boolean remapChars) in D:\a\1\s\pkNX.Structures\Text\TextFile.cs:line 465 at pkNX.WinForms.TextContainer.Save() in D:\a\1\s\pkNX.WinForms\Subforms\TextContainer.cs:line 46 at pkNX.WinForms.TextEditor.B_Save_Click(Object sender, EventArgs e) in D:\a\1\s\pkNX.WinForms\Subforms\TextEditor.cs:line 347 at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam)

** Loaded Assemblies ** System.Private.CoreLib Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Private.CoreLib.dll

pkNX Assembly Version: 1.0.0.0 Location: C:\Users_____\Desktop\pkNX\pkNX\net8.0-windows\pkNX.dll

PresentationFramework Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.1\PresentationFramework.dll

WindowsBase Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.1\WindowsBase.dll

System.Runtime Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Runtime.dll

System.Xaml Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.1\System.Xaml.dll

System.Threading.Thread Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Threading.Thread.dll

System.Windows.Forms Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.1\System.Windows.Forms.dll

System.Windows.Forms.Primitives Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.1\System.Windows.Forms.Primitives.dll

System.IO.Packaging Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.1\System.IO.Packaging.dll

System.Private.Uri Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Private.Uri.dll

PresentationCore Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.1\PresentationCore.dll

DirectWriteForwarder Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.1\DirectWriteForwarder.dll

System.Runtime.Extensions Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Runtime.Extensions.dll

System.Runtime.InteropServices Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Runtime.InteropServices.dll

System.Diagnostics.Debug Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Diagnostics.Debug.dll

System.Runtime.CompilerServices.VisualC Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Runtime.CompilerServices.VisualC.dll

System.Threading Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Threading.dll

Microsoft.Win32.Primitives Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\Microsoft.Win32.Primitives.dll

System.Collections.NonGeneric Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Collections.NonGeneric.dll

Microsoft.Win32.Registry Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\Microsoft.Win32.Registry.dll

System.Collections Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Collections.dll

System.Collections.Specialized Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Collections.Specialized.dll

System.Memory Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Memory.dll

System.ComponentModel.Primitives Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.ComponentModel.Primitives.dll

System.Configuration.ConfigurationManager Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.1\System.Configuration.ConfigurationManager.dll

System.Xml.ReaderWriter Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Xml.ReaderWriter.dll

System.Private.Xml Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Private.Xml.dll

System.Net.WebClient Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Net.WebClient.dll

System.Text.Encoding.Extensions Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Text.Encoding.Extensions.dll

System.Linq Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Linq.dll

System.Drawing.Common Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.1\System.Drawing.Common.dll

System.Diagnostics.TraceSource Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Diagnostics.TraceSource.dll

System.Drawing.Primitives Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Drawing.Primitives.dll

System.Threading.ThreadPool Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Threading.ThreadPool.dll

System.ComponentModel.TypeConverter Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.ComponentModel.TypeConverter.dll

System.Windows.Extensions Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.1\System.Windows.Extensions.dll

System.ComponentModel Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.ComponentModel.dll

System.Collections.Concurrent Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Collections.Concurrent.dll

System.ObjectModel Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.ObjectModel.dll

System.Net.Requests Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Net.Requests.dll

System.Net.Primitives Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Net.Primitives.dll

System.Net.WebHeaderCollection Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Net.WebHeaderCollection.dll

FontAwesome.Sharp Assembly Version: 6.3.0.0 Location: C:\Users_____\Desktop\pkNX\pkNX\net8.0-windows\FontAwesome.Sharp.dll

System.Diagnostics.Process Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Diagnostics.Process.dll

PresentationFramework.Aero2 Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.1\PresentationFramework.Aero2.dll

PKHeX.Drawing.PokeSprite Assembly Version: 23.2.27.0 Location: C:\Users_____\Desktop\pkNX\pkNX\net8.0-windows\PKHeX.Drawing.PokeSprite.dll

pkNX.Structures Assembly Version: 1.0.0.0 Location: C:\Users_____\Desktop\pkNX\pkNX\net8.0-windows\pkNX.Structures.dll

UIAutomationTypes Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.1\UIAutomationTypes.dll

System.Text.Json Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Text.Json.dll

PresentationFramework-SystemXml Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.1\PresentationFramework-SystemXml.dll

UIAutomationProvider Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.1\UIAutomationProvider.dll

pkNX.Game Assembly Version: 1.0.0.0 Location: C:\Users_____\Desktop\pkNX\pkNX\net8.0-windows\pkNX.Game.dll

pkNX.Containers Assembly Version: 1.0.0.0 Location: C:\Users_____\Desktop\pkNX\pkNX\net8.0-windows\pkNX.Containers.dll

System.Numerics.Vectors Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Numerics.Vectors.dll

FlatSharp.Runtime Assembly Version: 7.4.0.0 Location: C:\Users_____\Desktop\pkNX\pkNX\net8.0-windows\FlatSharp.Runtime.dll

Microsoft.Win32.SystemEvents Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.1\Microsoft.Win32.SystemEvents.dll

System.ComponentModel.EventBasedAsync Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.ComponentModel.EventBasedAsync.dll

System.Xml.XmlSerializer Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Xml.XmlSerializer.dll

pkNX.Randomization Assembly Version: 1.0.0.0 Location: C:\Users_____\Desktop\pkNX\pkNX\net8.0-windows\pkNX.Randomization.dll

System.Runtime.Loader Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Runtime.Loader.dll

System.Reflection.Emit.ILGeneration Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Reflection.Emit.ILGeneration.dll

System.Reflection.Emit Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Reflection.Emit.dll

Microsoft.GeneratedCode Assembly Version: 1.0.0.0 Location:

System.Reflection.Primitives Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Reflection.Primitives.dll

System.Text.RegularExpressions Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Text.RegularExpressions.dll

System.Console Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Console.dll

Accessibility Assembly Version: 4.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.1\Accessibility.dll

System.Diagnostics.StackTrace Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Diagnostics.StackTrace.dll

System.Reflection.Metadata Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Reflection.Metadata.dll

System.Collections.Immutable Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.Collections.Immutable.dll

System.IO.MemoryMappedFiles Assembly Version: 8.0.0.0 Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\System.IO.MemoryMappedFiles.dll

** JIT Debugging **