# LUA throws an error when script is run, but then works fine

**URL:** <https://forum.electra.one/t/lua-throws-an-error-when-script-is-run-but-then-works-fine/3837>\
**Category:** General discussion\
**Created:** [July 27, 2025, 3:14pm UTC](https://forum.electra.one/t/lua-throws-an-error-when-script-is-run-but-then-works-fine/3837 "2025-07-27T15:14:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Electrolove](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/electrolove/32/2440_2.png) [@Electrolove](https://forum.electra.one/u/Electrolove)\
**Post date:** [July 27, 2025, 3:14pm UTC](https://forum.electra.one/t/lua-throws-an-error-when-script-is-run-but-then-works-fine/3837/1 "2025-07-27T15:14:29Z")

</div>

Is anyone else experiencing an issue where LUA throws an error sometimes a script is run, but then works fine on the next attempt without any changes?

> 17:10:15.608 ---- START ----  
> 17:10:15.613 loadLuaModule: error loading file: filename=ctrlv2/slots/b00/p01/main.lua, error=ctrlv2/slots/b00/p01/main.lua:20: unexpected symbol near ‘\<\240\>’  
> 17:10:15.614 ----- END -----  
> 17:10:47.504 loadLua debug output:

> 17:10:47.506 ---- START ----  
> 17:10:47.515 loadLuaModule: Lua extension file initialized: file=ctrlv2/slots/b00/p01/main.lua  
> 17:10:47.516 ----- END -----

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [August 2, 2025, 8:08am UTC](https://forum.electra.one/t/lua-throws-an-error-when-script-is-run-but-then-works-fine/3837/2 "2025-08-02T08:08:42Z")

</div>

\240 is F0h, which is start of a SysEx message. Based on what you experienced and mentioned in the past, it looks like that there is a collision of the preset transfer with other SysEx message. I just added that on my bug list and will review that.
