# Too few arguments for "…()" call. Expected at least N but received M in Godot 4

The call passes fewer arguments than the function's required parameters. heal(5) on func heal(amount: int, source: String) fails to parse with Too few arguments for "heal()" call. Expected at least 2 but received 1. Pass every required argument, or give the later parameters default values.

Source: https://flockbay.com/godot/too-few-arguments-for-call-expected-at-least/ · Updated 2026-10-30

## What Godot is checking

When the analyzer knows which function is called, it counts the parameters without a default value and compares them with the arguments. Too few stops the script at load time.

When it cannot know, through an untyped variable, the count is checked at run time instead and the message is Invalid call to function 'heal' in base '…'. Expected 2 argument(s).

## Reproduce it

A heal(amount, source) function called with one argument.

```
extends Node

func heal(amount: int, source: String) -> void:
	print("healed ", amount, " by ", source)

func _ready() -> void:
	heal(5)

```

## What Godot 4.7.2 prints

```
Godot Engine v4.7.2.stable.mono.official.ed1daf0bf - https://godotengine.org

SCRIPT ERROR: Parse Error: Too few arguments for "heal()" call. Expected at least 2 but received 1.
   at: GDScript::reload (res://answers/too-few-arguments-for-call-expected-at-least/repro.gd:7)
ERROR: Failed to load script "res://answers/too-few-arguments-for-call-expected-at-least/repro.gd" with error "Parse error".
   at: load (modules/gdscript/gdscript_resource_format.cpp:46)
```

## Fix it

Give the second parameter a default, so both calls work.

```
extends Node

func heal(amount: int, source: String = "potion") -> void:
	print("healed ", amount, " by ", source)

func _ready() -> void:
	heal(5)
	heal(5, "fountain")

```

## What the fixed script prints

```
Godot Engine v4.7.2.stable.mono.official.ed1daf0bf - https://godotengine.org

healed 5 by potion
healed 5 by fountain
```

## Run this fix with your agent

Flockbay is the Godot editor with an AI agent built in. Paste this into Flockbay's chat, or into Claude Code or Codex connected to Flockbay over MCP: the agent finds the cause in your project, applies the fix, runs the game headless and reads Godot's output to check it.

```
My Godot 4 project prints this error: "Parse Error: Too few arguments for "heal()" call. Expected at least 2 but received 1.". Find where it comes from and fix it. The call passes fewer arguments than the function's required parameters. heal(5) on func heal(amount: int, source: String) fails to parse with Too few arguments for "heal()" call. Expected at least 2 but received 1. Pass every required argument, or give the later parameters default values. Then run the game headless and check that Godot's output no longer shows it.
```

## Verified on Godot 4.7.2

Both scripts on this page were run headless on Godot 4.7.2 (4.7.2.stable.mono.official.ed1daf0bf) on 18 October 2026, and the output above is what Godot printed, unedited.

Where the check lives in Godot's source: [gdscript_analyzer.cpp line 6075, the message](https://github.com/godotengine/godot/blob/4.7.2-stable/modules/gdscript/gdscript_analyzer.cpp#L6075).

## Questions

### Can default parameters come before required ones?

No. Once a parameter has a default, every parameter after it needs one too.

### Does this apply to signals I emit?

Emitting with fewer arguments than the signal declares is not checked at parse time; the connected methods fail when they are called.

Download Flockbay free: Flockbay's agent reads Godot's debugger output and fixes errors like this one in your project, on the official Godot. https://flockbay.com/download/

Related: [Invalid call to function '…' in base '…'. Expected N argument(s) in Godot 4](/godot/invalid-call-to-function-expected-arguments/), [Invalid argument for "…()" function: argument 1 should be "…" but is "…" in Godot 4](/godot/invalid-argument-for-function-argument-should-be/), [The function signature doesn't match the parent. Parent signature is "…" in Godot 4](/godot/function-signature-doesnt-match-the-parent/), [Function "…()" not found in base self in Godot 4](/godot/function-not-found-in-base-self/), [Every verified Godot 4 answer](/godot/), [How do I see Godot’s output and errors in Flockbay?](/docs/how-do-i-see-godots-output-in-flockbay/)
