A Dead Discussion Board

Holy crap, people are attempting to revive this place.
 
Home­Portal­Gallery­FAQ­Usergroups­Search­Register­Log in
Share | 
 

 Lua.

View previous topic View next topic Go down 
AuthorMessage
Cody574
I.. Am ITALIPENGUINO PEICE OF BIRDSHIIIIT
I.. Am ITALIPENGUINO PEICE OF BIRDSHIIIIT


Male
Number of posts: 5839
Age: 14
Location: Kingman, Arizona
Referred from: I made this site.
Short bio: Wouldn't you like to know.
Infractions:
0 / 90 / 9

Happiness Gauge:
95 / 10095 / 100

Mood: N/A
Registration date: 2007-09-05

Game Sheet
Points: 20222
Items:

PostSubject: Lua.   Sat Sep 19, 2009 6:35 pm

I've finally took a step towards programming something less babyish than Visual Basic, yet C, C#, and C++ all look too confusing to me. I've decided to take up practicing Lua.

Here's some of my first chunks:

> YourMom = 5+5-10+2*5 -- The variable YourMom is set to do a bunch of math.
> print(YourMom) -- Do the problem :3


> WhoTheFuckAmI = "I'm Sonicfan574, you asshole." -- Tell Lua who I am
> print(WhoTheFuckAmI) -- Make Lua tell me who I am


> Sonic = 1 -- Sonic is #1.
> Tails = 2 -- Tails is #2.
> Knuckles = 3 -- Knux is #3.
> print(Sonic+Tails+Knuckles) -- Add it up.


Haha, this is fun. I'll have to post more Lua chunks later.

Oh, and if anyone's thinking of trying this:
http://www.lua.org/download.html - Lua source code, advanced users only.
http://luabinaries.luaforge.net/download.html - Lua binaries. There's a better one at http://luaforwindows.luaforge.net/
http://notepad-plus.sourceforge.net/uk/site.htm - Notepad++, an advanced alternative to Microsoft Notepad, also includes scripting editors, Lua is included.

_________________
Blockland Photo Album
Spoiler:
 




Last edited by ArizonaSucks on Sat Sep 19, 2009 8:13 pm; edited 1 time in total
Back to top Go down
View user profile http://ca.youtube.com/Jimmy57452 http://ca.youtube.com/Jimmy57452 http://twitter.com/Sonicfan574
smileygirl
Nearing Permanent Ban
Nearing Permanent Ban


Male
Number of posts: 177
Age: 15
Location: PA
Infractions:
7 / 97 / 9

Happiness Gauge:
0 / 1000 / 100

Mood: N/A
Registration date: 2009-06-11

PostSubject: Re: Lua.   Sat Sep 19, 2009 7:18 pm

Do you ever finish anything?
Back to top Go down
View user profile
Games34208
No, Im Not Gay
No, Im Not Gay


Male
Number of posts: 1222
Age: 12
Location: Getting ready to stealth kill Obama
Referred from: Chuck Norris
Short bio: Im a Math Honors student, bored outta my freaking mind.
Infractions:
8 / 98 / 9

Happiness Gauge:
0 / 1000 / 100

Mood: I just watched 2 girls 1 cup :_(
Registration date: 2007-09-15

Game Sheet
Points: 12925
Items:

PostSubject: Re: Lua.   Sat Sep 19, 2009 7:24 pm

Just for questions (and because I dont want to have to Wiki it),what IS Lua?

_________________
Is it Racist that you're viewing a Indian guy's signature and laughing at the thing below it?
Back to top Go down
View user profile
Cody574
I.. Am ITALIPENGUINO PEICE OF BIRDSHIIIIT
I.. Am ITALIPENGUINO PEICE OF BIRDSHIIIIT


Male
Number of posts: 5839
Age: 14
Location: Kingman, Arizona
Referred from: I made this site.
Short bio: Wouldn't you like to know.
Infractions:
0 / 90 / 9

Happiness Gauge:
95 / 10095 / 100

Mood: N/A
Registration date: 2007-09-05

Game Sheet
Points: 20222
Items:

PostSubject: Re: Lua.   Sat Sep 19, 2009 8:08 pm

smileygirl wrote:
Do you ever finish anything?

How was that relevant to the topic?

Ryuhaku34 wrote:
Just for questions (and because I dont want to have to Wiki it),what IS Lua?

It's a pretty old programming language that first appeared in 1993 and is still in use today. You play Roblox, don't you? Roblox's scripting is done in Lua.


Anyway, made another chunk. I made this to calculate your average grade in school (high school/middle school only).


-- My Class Average Finder
Class0 = 100 -- Your grade in 0 Hr
Class1 = 100 -- Your grade in 1st Hr
Class2 = 100 -- Your grade in 2nd Hr
Class3 = 100 -- Your grade in 3rd Hr
Class4 = 100 -- Your grade in 4th Hr
Class5 = 100 -- Your grade in 5th Hr
Class6 = 100 -- Your grade in 6th Hr
Divide = Class0+Class1+Class2+Class3+Class4+Class5+Class6
print(Divide/7)


Just add/remove classes and change the grades, it calculates your average. :3

_________________
Blockland Photo Album
Spoiler:
 


Back to top Go down
View user profile http://ca.youtube.com/Jimmy57452 http://ca.youtube.com/Jimmy57452 http://twitter.com/Sonicfan574
Cody574
I.. Am ITALIPENGUINO PEICE OF BIRDSHIIIIT
I.. Am ITALIPENGUINO PEICE OF BIRDSHIIIIT


Male
Number of posts: 5839
Age: 14
Location: Kingman, Arizona
Referred from: I made this site.
Short bio: Wouldn't you like to know.
Infractions:
0 / 90 / 9

Happiness Gauge:
95 / 10095 / 100

Mood: N/A
Registration date: 2007-09-05

Game Sheet
Points: 20222
Items:

PostSubject: Re: Lua.   Mon Sep 21, 2009 8:27 pm

I'ma try writing a little program in Lua. Hope this works.

_________________
Blockland Photo Album
Spoiler:
 


Back to top Go down
View user profile http://ca.youtube.com/Jimmy57452 http://ca.youtube.com/Jimmy57452 http://twitter.com/Sonicfan574
Cody574
I.. Am ITALIPENGUINO PEICE OF BIRDSHIIIIT
I.. Am ITALIPENGUINO PEICE OF BIRDSHIIIIT


Male
Number of posts: 5839
Age: 14
Location: Kingman, Arizona
Referred from: I made this site.
Short bio: Wouldn't you like to know.
Infractions:
0 / 90 / 9

Happiness Gauge:
95 / 10095 / 100

Mood: N/A
Registration date: 2007-09-05

Game Sheet
Points: 20222
Items:

PostSubject: Re: Lua.   Tue Sep 22, 2009 7:46 pm

New average grade calculator ftw.
This time, you can execute the thing without changing anything, that is, if you have the same class setup as me. It prompts you for your grades within the program.

Didn't feel like adding colours.


print("Welcome to Sonicfan574's Class Average Finder.")
print("Enter your 0 Hour grade...")
Class0 = io.read() -- Prompt user for 0 Hr grade
print("Alright, got it, your 0 Hour grade is " .. Class0 .. "%. Please enter your 1st Hour grade...")
Class1 = io.read() -- Prompt user for 1st Hr grade
print("Alright, got it, your 1st Hour grade is " .. Class1 .. "%. Please enter your 2nd Hour grade...")
Class2 = io.read() -- Prompt user for 2nd Hr grade
print("Alright, got it, your 2nd Hour grade is " .. Class2 .. "%. Please enter your 3rd Hour grade...")
Class3 = io.read() -- Prompt user for 3rd Hr grade
print("Alright, got it, your 3rd Hour grade is " .. Class3 .. "%. Please enter your 4th Hour grade...")
Class4 = io.read() -- Prompt user for 4th Hr grade
print("Alright, got it, your 4th Hour grade is " .. Class4 .. "%. Please enter your 5th Hour grade...")
Class5 = io.read() -- Prompt user for 5th Hr grade
print("Alright, got it, your 5th Hour grade is " .. Class5 .. "%. Please enter your 6th Hour grade, this is the last one.")
Class6 = io.read() -- Prompt user for 6th Hr grade
print("Got it, your 6th Hr grade is " .. Class6 .. "%.")
print("That's it, calculating your average...")
Divide = Class0+Class1+Class2+Class3+Class4+Class5+Class6 -- Add up the grades
FinalResult = Divide/7 -- Divide the grades by the number of classes
print("Your grade average is " .. FinalResult .. ".")
print("Thanks for using Sonicfan574's Class Average Finder!")

_________________
Blockland Photo Album
Spoiler:
 


Back to top Go down
View user profile http://ca.youtube.com/Jimmy57452 http://ca.youtube.com/Jimmy57452 http://twitter.com/Sonicfan574
Cody574
I.. Am ITALIPENGUINO PEICE OF BIRDSHIIIIT
I.. Am ITALIPENGUINO PEICE OF BIRDSHIIIIT


Male
Number of posts: 5839
Age: 14
Location: Kingman, Arizona
Referred from: I made this site.
Short bio: Wouldn't you like to know.
Infractions:
0 / 90 / 9

Happiness Gauge:
95 / 10095 / 100

Mood: N/A
Registration date: 2007-09-05

Game Sheet
Points: 20222
Items:

PostSubject: Re: Lua.   Sat Nov 14, 2009 4:14 pm

Made a neat program that can reverse words/sentences and save it to a file.




-- Reverser v1
-- Sonicfan574

-- I would not recommend modifying anything in here. You can do everything from the Lua command line.

-- This is the function that will reverse sentences.
-- Type Reverser() into the command line after dofile'ing.
function Reverser()
print("Please enter the sentence you would like to reverse")
rev = io.read()
print(string.reverse(rev))
end

-- This is the function that can save reversed sentences to a text file.
-- Type RevSave() into the command line after reversing something.
function RevSave()
file = io.open("Reverses.txt","a")
file:write(rev)
file:write("\n")
file:write(string.reverse(rev))
file:write("\n")
file:write("\n")
file:close()
print("Your latest reversed word has been added to the reversed sentences file.")
end

_________________
Blockland Photo Album
Spoiler:
 


Back to top Go down
View user profile http://ca.youtube.com/Jimmy57452 http://ca.youtube.com/Jimmy57452 http://twitter.com/Sonicfan574
Cody574
I.. Am ITALIPENGUINO PEICE OF BIRDSHIIIIT
I.. Am ITALIPENGUINO PEICE OF BIRDSHIIIIT


Male
Number of posts: 5839
Age: 14
Location: Kingman, Arizona
Referred from: I made this site.
Short bio: Wouldn't you like to know.
Infractions:
0 / 90 / 9

Happiness Gauge:
95 / 10095 / 100

Mood: N/A
Registration date: 2007-09-05

Game Sheet
Points: 20222
Items:

PostSubject: Re: Lua.   Thu Feb 04, 2010 8:52 pm

I discovered a 2D game engine called LOVE which uses Lua as a backend. It comes complete with physics and everything.

Unfortunately, it's hard to use. D:

Hopefully I'll get some demos done eventually.

_________________
Blockland Photo Album
Spoiler:
 


Back to top Go down
View user profile http://ca.youtube.com/Jimmy57452 http://ca.youtube.com/Jimmy57452 http://twitter.com/Sonicfan574
 

Lua.

View previous topic View next topic Back to top 
Page 1 of 1

Permissions of this forum:You cannot reply to topics in this forum
A Dead Discussion Board :: Discussions :: Computers & Technology-