-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error using zero or null as optional parameter #1
Comments
When making the prototype, I decided to use
I could change the standard to use either
But this is something that one can get used to as time goes on. Do you have any suggestion on how to handle this? |
Thanks for the reply. I didn't know
As far as I understand, all of this is also true for
The result will be that the configuration of unloader1 will be Personally, I prefer to use |
This is not a very good example because the parameter you are using for the demonstration is actually used by the instruction, so it is expected that giving an invalid value (in this case it expects an item or null) causes the instruction do not do anything. It's like saying that A more correct example would be:
Regardless, I will change the ignored variable to |
Using zero or null in a function as an optional output parameter results in the error "Cannot use a literal value as an output parameter". Such constructions as in the example below are used to avoid creating unnecessary variables if the output result is not important.
Example:
Error message:
Code in game:
The text was updated successfully, but these errors were encountered: