diff --git a/common/common_system.ts b/common/common_system.ts index 25d0f7fe..6222f4ea 100644 --- a/common/common_system.ts +++ b/common/common_system.ts @@ -62,10 +62,10 @@ export abstract class CommonSystem { Object.keys(this.scriptEnv.eventHandlers).length, "event handlers from space-script", ); + await this.spaceLuaEnv.reload(this.system, this.scriptEnv); } catch (e: any) { console.error("Error loading space-script:", e.message); } - await this.spaceLuaEnv.reload(this.system, this.scriptEnv); functions = { ...functions, ...this.scriptEnv.functions }; // Reset the space script commands