What go inside the brackets in voids?
So, for example: If I have a line of code like void Move(), what will go inside those brackets? I have seen people put variables in them, for what use?
Scripts are written in C#, which is a regular computer progra$$anonymous$$g language. The simplest thing to do is just read any book about C#. It will explain "void" along with everything else. That would be in the chapter on functions, but you might want to start at the beginning.
@Landern is correct in his description of what void is. But what goes in the brackets is completely dependent on what you need to pass into the function. If the function requires extra information it can be passed through into the function in the brackets. take for instance a function that multiply's two numbers. you would need to pass those two numbers into the function so it would look like this
private void $$anonymous$$ultiply(int num1, int num2)
{
}
alternatively if there is nothing that needs to be passed into the function, then nothing is needed between the brackets.
Answer by Landern · Aug 15, 2016 at 03:50 PM
void is describing the returned type, if the method returns anything then you need to specify the return type, be it a primitive type(like int, float, string etc) or a complex/custom type. The returned type doesn't determine the method arguments/parameters. What goes between the parenthesis are arguments/parameters to be used in the method, none are required to do work if what you need is available or will be retrieved in the method.