CompileErrors/A0001: Difference between revisions

From Compost Wiki
Jump to navigation Jump to search
Danielr (talk | contribs)
Created page with "{{DISPLAYTITLE:A0001 - Too many arguments in argument group}} ==Description== A0001 is issued when there are too many arguments in an argument group for a command. Each com..."
 
Danielr (talk | contribs)
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:A0001 - Too many arguments in argument group}}
=A0001 - Too many arguments in argument group for command: <command>=
 
__NOTOC__


==Description==
==Description==

Revision as of 20:51, 8 January 2015

A0001 - Too many arguments in argument group for command: <command>

Description

A0001 is issued when there are too many arguments in an argument group for a command. Each command in the keyword list (and each subroutine in a post) knows how many arguments are expected, and if an argument group contained in parentheses follows the command, the number of arguments is checked. If more arguments are passed than the keyword or subroutine expects, this error is issued.

This error is occasionally triggered by legacy posts which expect parentheses to be treated as whitespace, instead of having grouping semantics. In this case, rearrange the parentheses to group arguments correctly.

Example

SetFlag expects a single literal argument.

SetFlag('ToolOffsetOn', TRUE) { A0001 - Too many arguments in argument group for command: SetFlag }

Resolution

Remove the extra arguments from the argument group.

SetFlag('ToolOffsetOn') { No error }