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)
Use template
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:A0001 - Too many arguments in argument group}}
{{CompileError
 
|errortext = A0001 - Too many arguments in argument group for command: <command>
==Description==
|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.
 
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.
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.
 
|exampletext = SetFlag expects a single literal argument.
==Example==
|examplecode = SetFlag('ToolOffsetOn', TRUE) { A0001 - Too many arguments in argument group for command: SetFlag }
 
|resolutiontext = Remove the extra arguments from the argument group.
SetFlag expects a single literal argument.
|resolutioncode = SetFlag('ToolOffsetOn') { No error }
 
}}
<code>SetFlag('ToolOffsetOn', TRUE) { A0001 - Too many arguments in argument group for command: SetFlag } </code>
 
==Resolution==
 
Remove the extra arguments from the argument group.
 
<code>SetFlag('ToolOffsetOn') { No error }</code>
 
[[Category:Compiler Errors]]

Latest revision as of 21:11, 13 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 of Cause

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 }