Function "…()" not found in base self in Godot 4
By Eduardo Orellana · Updated
The script calls a function it does not define and does not inherit. jump() in a script with no func jump() fails to parse with Function "jump()" not found in base self. Define it, fix the spelling, or call it on the node that has it: $Player.jump().
AppImage, x86_64. Ubuntu 22.04, Debian 12, Fedora 39 or newer.
Intel or AMD Chromebook, with Linux turned on.
What Godot is checking
A call with no object before it is a call on self, the node the script is attached to. The analyzer looks for the function in the script, then in each class it extends up to Object, and stops the script when none has it.
Built-in methods count: a script that extends Node2D can call show() or look_at() without defining them. A method from a class it does not extend, such as move_and_slide() in a script that extends Node2D, is this error.
More on this: Spatial in Godot 4: Could not find base class "Spatial"
Reproduce it
A script that calls jump() without defining it.
extends Node
func _ready() -> void:
jump()
What Godot 4.7.2 prints
Godot Engine v4.7.2.stable.mono.official.ed1daf0bf - https://godotengine.org
SCRIPT ERROR: Parse Error: Function "jump()" not found in base self.
at: GDScript::reload (res://answers/function-not-found-in-base-self/repro.gd:4)
ERROR: Failed to load script "res://answers/function-not-found-in-base-self/repro.gd" with error "Parse error".
at: load (modules/gdscript/gdscript_resource_format.cpp:46)Fix it
Define the function in the script that calls it.
extends Node
func jump() -> void:
print("jump")
func _ready() -> void:
jump()
What the fixed script prints
Godot Engine v4.7.2.stable.mono.official.ed1daf0bf - https://godotengine.org
jumpA method of a class the script does not extend
move_and_slide() belongs to CharacterBody2D and CharacterBody3D. A script that extends Node2D or Area2D does not have it. Change extends to the node's real type, which the Scene dock shows.
More on this: KinematicBody2D in Godot 4: Could not find base class "KinematicBody2D"
A Godot 3 method that was renamed
Calls such as instance() or get_rect() on the wrong class, or yield(), were renamed or removed in Godot 4. For renamed ones the message adds the new name.
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 3769, the message](https://github.com/godotengine/godot/blob/4.7.2-stable/modules/gdscript/gdscript_analyzer.cpp#L3769).
Questions
- How do I call a function on another node?
- Through a reference to it: $Player.jump(), or an @onready var player = $Player and then player.jump().
- Is the order of functions in the file important?
- No. A function can call one defined further down the same script.
Related
- Identifier "…" not declared in the current scope
- Invalid call. Nonexistent function in base 'Nil'
- Every verified Godot 4 answer
- Cannot call method '…' on a null value in Godot 4
- Cannot get return value of call to "…()" because it returns "void" in Godot 4
- How to get collisions after move_and_slide() in Godot 4
- How to get the class name of a node in Godot 4: get_class() and get_global_name()
- Invalid access to property or key on a base object of type 'null instance' in Godot 4
Flockbay's agent reads Godot's debugger output and fixes errors like this one in your project, on the official Godot.
Download Flockbay free