viktor-ferenczi / multigrid-projector

Multigrid Projector plugin for the Space Engineers game.
MIT License
24 stars 6 forks source link

Fix PL build error #77

Closed mkaito closed 5 months ago

mkaito commented 5 months ago

Upon 0.7.0 release I got this error report from a user:

2024-05-03 22:10:35.411 - Thread:   1 ->  [PluginLoader] [Info] Downloading https://github.com/viktor-ferenczi/multigrid-projector/archive/ff9143a627450e6162f4bf9dd4a74794ec3ec085.zip
2024-05-03 22:10:39.364 - Thread:   1 ->  [PluginLoader] [Error] CS0165: Use of unassigned local variable 'blockDefinition' in file:
multigrid-projector-ff9143a627450e6162f4bf9dd4a74794ec3ec085/MultigridProjector/Extensions/MyObjectBuilderExtensions.cs (86,166)
2024-05-03 22:10:39.373 - Thread:   1 ->  [PluginLoader] [Error] Failed to load viktor-ferenczi/multigrid-projector|Multigrid Projector because of an error: System.Exception: Compilation failed!
   at avaness.PluginLoader.Compiler.RoslynCompiler.Compile(String assemblyName, Byte[]& symbols)
   at avaness.PluginLoader.Data.GitHubPlugin.CompileFromSource(String commit, String assemblyName, Action`1 callback)
   at avaness.PluginLoader.Data.GitHubPlugin.GetAssembly()
   at avaness.PluginLoader.Data.PluginData.TryLoadAssembly(Assembly& a)

This is an attempt to fix this.

SpaceGT commented 5 months ago

Hi Since you did not assign anything to blockDefinition it remains unassigned. I will push a fix for the fix.