ItsDeltin / Overwatch-Script-To-Workshop

Converts scripts to Overwatch workshops.
207 stars 24 forks source link

fix "Visible To Position Direction and Size" exception #441

Closed scorttt closed 1 year ago

scorttt commented 1 year ago

fixes:


System.TypeInitializationException: The type initializer for 'Deltin.Deltinteger.Elements.ElementList' threw an exception.
 ---> System.Collections.Generic.KeyNotFoundException: The enum member 'Visible To Position Direction and Size' was not found.
   at Deltin.Deltinteger.Elements.ElementEnum.GetMemberFromWorkshop(String name) in /home/runner/work/Overwatch-Script-To-Workshop/Overwatch-Script-To-Workshop/Deltinteger/Deltinteger/Elements/Structure.cs:line 178
   at Deltin.Deltinteger.Elements.ElementParameter.GetDefaultValue() in /home/runner/work/Overwatch-Script-To-Workshop/Overwatch-Script-To-Workshop/Deltinteger/Deltinteger/Elements/Structure.cs:line 145
   at Deltin.Deltinteger.Elements.ElementList..ctor(ElementBaseJson function) in /home/runner/work/Overwatch-Script-To-Workshop/Overwatch-Script-To-Workshop/Deltinteger/Deltinteger/Elements/ElementList.cs:line 74
   at Deltin.Deltinteger.Elements.ElementList..ctor(ElementJsonAction action) in /home/runner/work/Overwatch-Script-To-Workshop/Overwatch-Script-To-Workshop/Deltinteger/Deltinteger/Elements/ElementList.cs:line 94
   at Deltin.Deltinteger.Elements.ElementList.GetWorkshopFunctions() in /home/runner/work/Overwatch-Script-To-Workshop/Overwatch-Script-To-Workshop/Deltinteger/Deltinteger/Elements/ElementList.cs:line 160
   at Deltin.Deltinteger.Elements.ElementList..cctor() in /home/runner/work/Overwatch-Script-To-Workshop/Overwatch-Script-To-Workshop/Deltinteger/Deltinteger/Elements/ElementList.cs:line 151
   --- End of inner exception stack trace ---
   at Deltin.Deltinteger.Elements.ElementList.AddWorkshopFunctionsToScope(Scope scope, ITypeSupplier typeSupplier) in /home/runner/work/Overwatch-Script-To-Workshop/Overwatch-Script-To-Workshop/Deltinteger/Deltinteger/Elements/ElementList.cs:line 172
   at Deltin.Deltinteger.Parse.DeltinScript.Translate() in /home/runner/work/Overwatch-Script-To-Workshop/Overwatch-Script-To-Workshop/Deltinteger/Deltinteger/Parse/Translate.cs:line 132
   at Deltin.Deltinteger.Parse.DeltinScript..ctor(TranslateSettings translateSettings) in /home/runner/work/Overwatch-Script-To-Workshop/Overwatch-Script-To-Workshop/Deltinteger/Deltinteger/Parse/Translate.cs:line 60
   at Deltin.Deltinteger.LanguageServer.DocumentHandler.Update(Document item) in /home/runner/work/Overwatch-Script-To-Workshop/Overwatch-Script-To-Workshop/Deltinteger/Deltinteger/Language Server/Handlers/DocumentHandler.cs:line 199```