**Error:**
wrong number (or type) of arguments

expecting ... arguments, got ...

Many of Maple's commands and functions are very particular about the number, types and order of the arguments they are given, and will cause an error if these are not correct.

Look at the help for a function, in particular the "calling sequence" and "parameters" sections, to see the correct forms to use. Or imitate one of the examples that are given on the help page.

Use the
**tracelast**
command to see more about the error. In particular it will show what functions were being called with what arguments when the error occurred. In some cases it may be helpful to use the
**type**
or
**whattype**
command to check on the type of some argument.

One common way that these errors can occur is when you try to use a name as a symbolic variable, but it turns out that the name has been assigned a value. This is the case in the second example below. If so, either use a different name that does not have a value or unassign the value if it is no longer needed.

**Examples:**

`> `
**sin(x,y);**

Error, (in sin) expecting 1 argument, got 2

`> `
**tracelast;**

sin called with arguments: x, y

#(sin,2): error "expecting 1 argument, got %1", nargs

Error, (in sin) expecting 1 argument, got 2

locals defined as: n = n, t = t, pull_out = pull_out, keep_in = keep_in

`> `
**t:= 2:**

`> `
**diff(t^2,t);**

Error, wrong number (or type) of parameters in function diff

`> `
**whattype(t);**

**See also:**
__tracelast__
,
__whattype__
,
__type__

**Maple Advisor Database**
R. Israel, 1997