General > Developers Corner

Learning Lua... (Just a random post from a lua super noob.)

(1/11) > >>

syn.:

--- Code: ---x = "Kenny"
if x == "Brandon" then
print("Hi, " .. x)
end
if x ~= "Brandon" then
print ("You are not Brandon, " .. x)
end

--- End code ---


--- Code: ---You are not Brandon, Kenny
--- End code ---
I swear I started crying when this actually worked!
God I feel like I accomplished something this week:)

Decicus:
While I understand you're a "Lua super noob", this would work as well, in the same way.

--- Code: ---x = "Kenny"
if x == "Brandon" then
print("Hi, " .. x)
else
print ("You are not Brandon, " .. x)
end

--- End code ---
It does the same exact thing as your code, but basically it does "Is 'X' Brandon? No. I'll print the 'else' code".

Other than that, you're doing good. I remember doing something that was similar in my earlier Lua days.

MrPresident:
I used to do things like this in BASIC back in.... 1998. You're doing it right. Learn the basics. Learn how coding works. You'll pick up more advanced stuff in time.

Too many people just try to jump right in and start editing. Then they don't know what they're doing, only how to modify certain things.

Megiddo:
I echo Decicus and MrP. We see so many people come through these forums asking us to teach them to do xyz task, by which they normally mean "do it for me". Good to see you're not getting frustrated by what may seem like small accomplishments.

Neku:
Learning one language will make learning other languages easier.

Lua is a good place to start.

Navigation

[0] Message Index

[#] Next page

Go to full version