Teach me some Lua :(

Here you can talk about everything you want.
User avatar
Lakan Haraya
Metropolitan
Reactions:
Posts: 108
Joined: Thu Mar 28, 2019 9:34
Location: Taytay, Rizal, Philippines
Plugins: Show
Version: Beta

Plugin Creator

Platform

Teach me some Lua :(

#1

Post by Lakan Haraya »

Hello! Does anyone here wants to teach me some lua stuffs :) I wanna make cool stuffs using that programming language. I visited the lua documentation by Lobby and didn't understand some functions and how they will run. I don't know what's the proper format for the codes :/ Please teach me, I wanna know. :lua: :fire
"ᜀᜃᜓ ᜀᜅ᜔ ᜁᜌᜓᜅ᜔ ᜑᜇᜌ"
CEO of Haráya Motors

“TheoTown Philippines Council”
“Kapulungan Ng Mga Nagkakaisang Lungsod”

Pinoy? Sali na :jb:
https://discord.gg/kWfUwd

User avatar
Ahmad Nur Aizat
TheoTown Veteran
Reactions:
Posts: 8243
Joined: Tue Oct 25, 2016 15:20
Location: Johor Bahru
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: Teach me some Lua :(

#2

Post by Ahmad Nur Aizat »

Uhhh, there already is a tutorial?

User avatar
CommanderABab
AB
Reactions:
Posts: 8561
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Teach me some Lua :(

#3

Post by CommanderABab »

Maybe you could show them where it is. :)
888!888Currently using zeta 888. 888 What's that? :)
quantum road tool!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
Ahmad Nur Aizat
TheoTown Veteran
Reactions:
Posts: 8243
Joined: Tue Oct 25, 2016 15:20
Location: Johor Bahru
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: Teach me some Lua :(

#4

Post by Ahmad Nur Aizat »

CommanderABab wrote:
Sat Aug 10, 2019 3:23
Maybe you could show them where it is. :)
Here

User avatar
Lakan Haraya
Metropolitan
Reactions:
Posts: 108
Joined: Thu Mar 28, 2019 9:34
Location: Taytay, Rizal, Philippines
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Teach me some Lua :(

#5

Post by Lakan Haraya »

Ahmad Nur Aizat wrote:
Sat Aug 10, 2019 7:44
CommanderABab wrote:
Sat Aug 10, 2019 3:23
Maybe you could show them where it is. :)
Here

How about the actual tutorials on other module stuffs like Builder, Util, Vector and more... That tutorial only shows a toast on each month :/
"ᜀᜃᜓ ᜀᜅ᜔ ᜁᜌᜓᜅ᜔ ᜑᜇᜌ"
CEO of Haráya Motors

“TheoTown Philippines Council”
“Kapulungan Ng Mga Nagkakaisang Lungsod”

Pinoy? Sali na :jb:
https://discord.gg/kWfUwd

User avatar
JustAnyone
enjenir
Reactions:
Posts: 2889
Joined: Sun Jul 23, 2017 12:45
Location: Easter Island
Plugins: Show

Re: Teach me some Lua :(

#6

Post by JustAnyone »

No one has time.
Perfect way to comment stuff out :)
🦀Now available as administrator🦀
Image

:pickle:

User avatar
JustAnyone
enjenir
Reactions:
Posts: 2889
Joined: Sun Jul 23, 2017 12:45
Location: Easter Island
Plugins: Show

Re: Teach me some Lua :(

#7

Post by JustAnyone »

Code: Select all

local ja = Draft.getDraft('$car_pickle00'):getFrame(1) --arrays start at 1
local facts = Array{'2+2 is 4 -1 is 3 quick maths', 'TheoTown 69 is in production', 'Lobby and JustAnyone are the only developers currently working on the game'}
City.showNotification{icon=ja, showOnce=true, id="$factnotifierja222", text='Got a fact for ya:'..facts:pick()..'!'}
Picks a random item from array and displays it in a notification when this code is run.
Perfect way to comment stuff out :)
🦀Now available as administrator🦀
Image

:pickle:

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2021
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: Teach me some Lua :(

#8

Post by KINGTUT10101 »

Is City.showNotification () a real thing? I can't seem to find it in the Lua document.

User avatar
JustAnyone
enjenir
Reactions:
Posts: 2889
Joined: Sun Jul 23, 2017 12:45
Location: Easter Island
Plugins: Show

Re: Teach me some Lua :(

#9

Post by JustAnyone »

It is, just undocumented.
Perfect way to comment stuff out :)
🦀Now available as administrator🦀
Image

:pickle:

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2021
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: Teach me some Lua :(

#10

Post by KINGTUT10101 »

How does it work?

User avatar
Imran M
Inhabitant of a Megalopolis
Reactions:
Posts: 609
Joined: Wed Oct 24, 2018 13:41
Plugins: Show

Platform

Plugin Creator

Re: Teach me some Lua :(

#11

Post by Imran M »

ØlskenAnyone wrote:
Sat Aug 10, 2019 22:26

Code: Select all

local ja = Draft.getDraft('$car_pickle00'):getFrame(1) --arrays start at 1
local facts = Array{'2+2 is 4 -1 is 3 quick maths', 'TheoTown 69 is in production', 'Lobby and JustAnyone are the only developers currently working on the game'}
City.showNotification{icon=ja, showOnce=true, id="$factnotifierja222", text='Got a fact for ya:'..facts:pick()..'!'}
Picks a random item from array and displays it in a notification when this code is run.
Yes! Computer Science did actually have an impact! I can finally UNDERSTAND it!
I have no clue what's happening this year

Locked Previous topicNext topic

Return to “Smalltalk”