Today I've spent close to an hour trying to figure out why my instrument was not working and then why AM (or rather Lua) rejected my script. It turned out, the text had a NULL character in it:
It seems to happen when pasting text into the built-in editor, but only on some conditions, not always. I don't know when exactly.
Now, I understand the built-in editor is barely functional, and improving it would be a big feature-request. There is a good reason there is a big button to open the script in an external editor. Yet, I tend to avoid doing that except for major edits (partly because of the editor mistreatment of tabs, which I much prefer to use). In any case, small corrections are easier to make right in the editor.
But this bug, inserting the NULL accidentally, is really dangerous. It's insidious because it's invisible in the editor. Apart from making the script non-functional, some external editors (that are less capable than Notepad++) may still hide it or worse, truncate the text there. I hope it can be fixed...
Built-in editor: hidden NULL characters
Re: Built-in editor: hidden NULL characters
I have never seen this happen to anyone since the editor was added to Air Manager, version 3.0 I think, so in 4 or 5 years. I'm not sure how you did this...
And apart from that, there's going to be a new editor in an upcoming version, so not really something to worry about.
And apart from that, there's going to be a new editor in an upcoming version, so not really something to worry about.
Re: Built-in editor: hidden NULL characters
Hi,
Isn't this just weird text that you are trying to add.
I would be looking at the source of the copy/paste action.
Having a NUL character in the text will probably only make the runner use all the text before the NUL chacterter, and ignore everything after.
Just speculation though, it simply shouldn't be there in the beginning
Corjan
Isn't this just weird text that you are trying to add.
I would be looking at the source of the copy/paste action.
Having a NUL character in the text will probably only make the runner use all the text before the NUL chacterter, and ignore everything after.
Just speculation though, it simply shouldn't be there in the beginning

Corjan
Re: Built-in editor: hidden NULL characters
Well, if we expect a new editor (which would be very welcome), there is no point pursuing the problem much.
But I can assure it happened to me several times, and all while copy-pasting either within the editor, or from the browser. (Hard to say exactly because I spot it much later).
But I can assure it happened to me several times, and all while copy-pasting either within the editor, or from the browser. (Hard to say exactly because I spot it much later).