Antoni Posted September 13, 2013 Posted September 13, 2013 So I'm learning Lua and when I do this: n = 20 s = 390 = n + s I get the error: input:3: unexpected symbol near '=' I think my tutorial is giving me an example like this from 5.1 so how would I write this in 5.2?
Antoni Posted September 13, 2013 Author Posted September 13, 2013 20 = n 390 = s = n + s input:1: unexpected symbol near '20' I don't think it's that. I'm running off http://www.lua.org/cgi-bin/demo could that be the problem? Do I need some kind of plugins first?
AHMAD1234 Posted September 13, 2013 Posted September 13, 2013 I mean like this:- n = 20 s = 390 w = n + s
ixjf Posted September 14, 2013 Posted September 14, 2013 You can print with = on the Lua interpreter (not on the online Lua demo).
Moderators IIYAMA Posted September 14, 2013 Moderators Posted September 14, 2013 Print is visible in the server console, but yes better to use output's.
Antoni Posted September 15, 2013 Author Posted September 15, 2013 It was simply because I was using the live demo. Thanks, it's working on the downloaded version.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now