Skip to content

Error using zero or null as optional parameter #1

Open
@limonovthesecond2

Description

@limonovthesecond2

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:

ulocate building core 1 @copper outx outy found1 building
ulocate building core 1 @copper outx outy found2 0
ulocate building core 1 @copper outx 0 found3 0
ulocate building core 1 @copper null null found4 null
ulocate building core 1 @copper outx outy null building

Error message:
Error message
Code in game:
Game

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions