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

What does the things between the parentheses mean? (Solved)

Asked by 4 years ago
Edited 4 years ago

This might sound stupid, but I am a beginner developer and don't know what these things mean, can somebody help?

Example:

local function placeBarrier(barrierNumber, barrierPlace)

I would really like to know what those mean.

1 answer

Log in to vote
6
Answered by
Ziffixture 6913 Moderation Voter Community Moderator
4 years ago
Edited 4 years ago

Arguments & Parameters

This is what is formally known as a parameter. It is a specially declared variable within the function, that refers and contains information provided during the operation of said function.

The way we assign this data, is by supplying arguments. These are passed through the parentheses of the function when it is called. Here is a better visualization of how this process occurs:

local function multiply(numberOne, numberTwo)
    print(numberOne * numberTwo)
end

multiply(2,5) --> 10

This allows the function to take in specific data, and use it accordingly; your function would need to know where and what barrier to place, so it requires that you supply these parameters so it knows what to use.

0
Thanks! Abysmallow 1 — 4y
Ad

Answer this question