Old 12-02-2020, 09:35 AM   #1
woodslanding
Human being with feelings
 
woodslanding's Avatar
 
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
Default Strange LUA error

this code is giving me an error message. It says 'unexpected symbol near <\194>'

I searched, and that looks like a unicode symbol, maybe?


Code:
KeyboardText = {        '1','2','3','4','5','6','7','8','9','0','backspace',
                        'q','w','e','r','t','y','u','i','o','p','\'',
                        'a','s','d','f','g','h','j','k','l','-','"',
                        'z','x','c','v','b',' ','n','m','&','_','enter',

                        '1','2','3','4','5','6','7','8','9','0','backspace',
                        'Q','W','E','R','T','Y','U','I','O','P','\'',
                        'A','S','D','F','G','H','J','K','L','-','"',
                        'Z','X','C','V','B',' ','N','M','&','_','enter'
}
WOAH! When I paste this here, my 'L' gets an exclamation point!!! Huh???

--oh, never mind, that's a piece of fluff on my monitor.

so.... any ideas what LUA doesn't like here?
__________________
eric moon
Very Stable Genius
https://gogolab.com/
woodslanding is offline   Reply With Quote
Old 12-02-2020, 09:54 AM   #2
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

You forgot to escape the " in each third line. It must be '"'
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 12-02-2020, 10:05 AM   #3
woodslanding
Human being with feelings
 
woodslanding's Avatar
 
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
Default

I didn't think I needed to escape it, since it was inside the other type of quotes...

Still getting the error with the code below (made some changes...)

But I guess I'll look up everything that could possibly need to be escaped...

Code:
KeyboardText = {        '1','2','3','4','5','6','7','8','9','0','backspace',
                        'q','w','e','r','t','y','u','i','o','p','&',
                        'a','s','d','f','g','h','j','k','l','-','#',
                        'z','x','c','v','b',' ','n','m','.','_','enter',

                        '1','2','3','4','5','6','7','8','9','0','backspace',
                        'Q','W','E','R','T','Y','U','I','O','P','\"',
                        'A','S','D','F','G','H','J','K','L','+','\'',
                        'Z','X','C','V','B',' ','N','M','(',')','enter'
}
__________________
eric moon
Very Stable Genius
https://gogolab.com/
woodslanding is offline   Reply With Quote
Old 12-02-2020, 10:31 AM   #4
woodslanding
Human being with feelings
 
woodslanding's Avatar
 
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
Default

Not finding anything else to escape. I'm perplexed. But something is wrong, as VSCODE keeps giving a parse error....
__________________
eric moon
Very Stable Genius
https://gogolab.com/
woodslanding is offline   Reply With Quote
Old 12-02-2020, 10:45 AM   #5
woodslanding
Human being with feelings
 
woodslanding's Avatar
 
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
Default

oh wow, crazy.

I copied the text FROM THIS POST, and that works!

I had used a word processor to convert the case, and it must have put in a character that's not visible in VSCODE!!!

how trippy!
__________________
eric moon
Very Stable Genius
https://gogolab.com/
woodslanding is offline   Reply With Quote
Old 12-02-2020, 12:47 PM   #6
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Yay.


Another thing that also could help, would be using the code-snippet in Reaper's own IDE.
I personally prefer it for it's more instant about errors.

And its syntax-highlighter probably shows better the potential problematic characters.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 12-07-2020, 04:55 PM   #7
woodslanding
Human being with feelings
 
woodslanding's Avatar
 
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
Default

I kind of hate the reaper editor, because it does not place the cursor like 97% of software. Probably some EMACS holdover behaviour or something, but I never can get used to it... also, it throws line numbers for errors, but doesn't actually SHOW the line numbers [??]

But nevertheless that's good to know
__________________
eric moon
Very Stable Genius
https://gogolab.com/
woodslanding is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:52 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.