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? BUY/SELL/TRADE ANYTHING RELATED TO MTA SERVER ACCOUNTS SERVER MONEY GAMEMODES SCRIPTING SERVICES
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? BUY/SELL/TRADE ANYTHING RELATED TO MTA SERVER ACCOUNTS SERVER MONEY GAMEMODES SCRIPTING SERVICES
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). I used to know how to code, but then I took an arrow in the knee. Project Redivivus - Remaking Old School MTA With New Code MTA 0.6 Nightly 1 released
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. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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. BUY/SELL/TRADE ANYTHING RELATED TO MTA SERVER ACCOUNTS SERVER MONEY GAMEMODES SCRIPTING SERVICES
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