Ok so usually at the beginning of codes on the first line, it would usually start with something like this
local ……=…………………(……)
What does that mean? Also I know this is a very beginner thing but I just never got around to learning what this means (I started like a month ago)
Hey Typical,
local a = 3 function sum(b, c) --Will return the sum of a, b, and c. a is in the bigger scope return a + b + c end function subtract(b) --Will return the difference between a and b return b-a end print(a + b + c) -- Will give you an error, something along the lines of performing arithmetic on nil
local function sum(a, b, c) -- Returns the sum of a, b, and c local function subtract(a, b) --Returns the difference between b and a. return b-a end subtract(2,1) -- Will run with no errors and returns -1 return a + b + c end sum(1,2,3) -- Returns 6. subtract(2, 1) -- Will error because subtract isn't a function defined in the bigger scope, but rather one defined within the scope of the function called sum.
Best regards,
Idealist Developer