Lua - Fehler

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Lua - Fehler

papr
Hello "Team Lua",
 
i have proper  installed "Lua 5.4.0" under Win7 64 bit,
The Lua - Terminal started with follow Head Message  "Lua 5.4.0 Copyrigth (c) 1994-2018 Lua.org. PUC-Rio"
When i will start my "test.lua", with content:         io.write(“Hello World!”)     over the Win7 Console,  there is no issue,
come the error message "L:\Lua\bin\lua.exe: L:\test.lua:1: unexpected symbol near `</147>` (see attachment ).
 
I´m a "Lua - Newbie", can you help me???
I would be very happy, could you sacrifice a few minutes of your precious time for my request.
 
 
Best regards from germany
Paul Preuß

Lua.test.jpg (33K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Lua - Fehler

Oliver Kroth


Am 12.07.2018 um 13:23 schrieb papr:
Hello "Team Lua",
 
i have proper  installed "Lua 5.4.0" under Win7 64 bit,
The Lua - Terminal started with follow Head Message  "Lua 5.4.0 Copyrigth (c) 1994-2018 Lua.org. PUC-Rio"
When i will start my "test.lua", with content:         io.write(“Hello World!”)     over the Win7 Console,  there is no issue,
come the error message "L:\Lua\bin\lua.exe: L:\test.lua:1: unexpected symbol near `</147>` (see attachment ).
 
I´m a "Lua - Newbie", can you help me???
I would be very happy, could you sacrifice a few minutes of your precious time for my request.
 
 
Best regards from germany
Paul Preuß

Check the quotes around Hello World!
They should be "", but seem to be “”

--
Oliver
Reply | Threaded
Open this post in threaded view
|

Re: Lua - Fehler

Hugo Musso Gualandi
In reply to this post by papr

I appears the problem is that you are using fancy quotation marks like “ and ” instead of straight quotation marks like ". (147 is the character code for the curved opening quotation mark.) Lua only accepts the straight quotation marks.

This most common reason this happens is if you type your code into a word processor like Microsoft Word. You should instead use a programming text editor like Notepad of Notepad++.

On Jul 12, 2018 8:23 AM, papr <[hidden email]> wrote:
Hello "Team Lua",
 
i have proper  installed "Lua 5.4.0" under Win7 64 bit,
The Lua - Terminal started with follow Head Message  "Lua 5.4.0 Copyrigth (c) 1994-2018 Lua.org. PUC-Rio"
When i will start my "test.lua", with content:         io.write(“Hello World!”)     over the Win7 Console,  there is no issue,
come the error message "L:\Lua\bin\lua.exe: L:\test.lua:1: unexpected symbol near `</147>` (see attachment ).
 
I´m a "Lua - Newbie", can you help me???
I would be very happy, could you sacrifice a few minutes of your precious time for my request.
 
 
Best regards from germany
Paul Preuß
Reply | Threaded
Open this post in threaded view
|

Re: Lua - Fehler

Scott Morgan
In reply to this post by papr
On 07/12/2018 12:23 PM, papr wrote:

> Hello "Team Lua",
>  
> i have proper  installed "Lua 5.4.0" under Win7 64 bit,
> The Lua - Terminal started with follow Head Message  "Lua 5.4.0
> Copyrigth (c) 1994-2018 Lua.org. PUC-Rio"
> When i will start my "test.lua", with content:         io.write(“Hello
> World!”)     over the Win7 Console,  there is no issue,
> come the _*error message "L:\Lua\bin\lua.exe: L:\test.lua:1: unexpected
> symbol near `</147>`*_ (see attachment ).
>  
> I´m a "Lua - Newbie", can you help me???
> I would be very happy, could you sacrifice a few minutes of your
> precious time for my request.

Couple of things:

You can copy/paste text from the Windows command prompt (From memory:
Use <ctrl>-m and highlight the area, then press <enter>). Better than
taking a screen-shot.

You're sample script seems to have 'left' quote marks (“), not normal
'straight' quotes ("). Are you using MS Word to edit? You might want to
find a good text editor to use (SciTE and Notepad++ are two popular ones
that have Lua support), it'll help a lot when writing scripts.

Scott