Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
4

help me understand these symbols or operators?

Asked by 4 years ago
Edited 4 years ago

as i have gathered i found scripts that had me confusing like

local hi = 5;

now as seeing from my eye i would like to ask what that ; does?

another

local m = {}
function m:Search()
end

as i have made a function a table is being used as a function i would like to ask what does : do, or is it just a same with diffirent symbol

next

i want to ask what does local function do?

what does _, mean?

0
thx for asking this man i had the same question on my mind too speedyfox66 237 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

_ is a placeholder. Or is also used for settings.

An example of it used as a placeholder is for _,v in pairs() do

An example for settings is _G.Enabled = true

Other uses i dont know about and really you sould find it on the forums more than anything.

As the symbol :

It in lua is used in certain functions such as :Clone() or :Connect()

Nomrally a function starting with : normally (Or all the time I don't know) end in this ()

Ad

Answer this question