Lua: I get error when I try to run a script in Windows

WhiteShark27

I'm trying to run a Lua script from Windows but I only get errors. I've put my script inside the same folder of the Lua shell but if I write the same line of my Lua book % lua name.lua I get stdin:1: unexpected symbol near '%' If i remove the % i get stdin:1: syntax error near 'prova'. I've found another thread here on stackoverflow. I've tried what the answer said but it doesn't work.

Joseph Sible-Reinstate Monica

There's two different problems here:

  1. As was mentioned in the comments, % is meant to represent the prompt, so you shouldn't actually type it.
  2. You're supposed to run lua name.lua from the command prompt, not from the Lua REPL.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

React App: Why I get an error when I try to run npm start script?

Is there a way to get rid of the syntax error when I run try and except?

Roslyn crashes when I try to run a script

When I run the code chunks everything works but when I try to Knit I get an error

I get this error when I try to install

Error on jest when I try to run the test

when i try to run my project i get the error that says no module named flask

When I try and run pyspark.cmd I get the error message "find: 'version': No such file or directory"

When I try to run my code with the "java" command in the cmd window, I get an error

I get an error when I try to run yarn build in next.js

When I try to run the Xcode simulator I get the error 'Stop “(null)”?'

When I try to run this I get this error TypeError: list indices must be integers or slices, not list

When I try to run my project on MAC terminal I get this error

Error: "'node' not recognized as..." when I try to run the file with package.json script

For loop in macro works when I step through but get run-time error '91' when I try to run it

Automatically run a script when I log on to Windows

My program throws an error when I try to run it on Linux (works fine on windows)

I get the error when i try get 50% of the image with cropperJS

I get an error when i try apt-get update?

it gives an error when i run a SQL script

Where am I going wrong with foreach when i try to get my script to run against each individual string in my results?

Why do I get an error when I use 'source' to run a TCL script?

I get an Error when I try to use Firebase Auth

Why I get error when I try to declare local variable?

Why I get error when I try to create stored procedure?

I get stray '#' in program error when I try to compile this program

Error I get when I try install IDE Anjuta

When I try to use scanf with 2 arrays I get an error

I get 404 error when I try endpoint on localhost