Skip to content

Cannot find member "…" in base "…" in Godot 4

By Eduardo Orellana · Updated

The type has no constant, enum value or property by that name. Vector2.ZER0, with a zero typed as the letter O, fails to parse with Cannot find member "ZER0" in base "Vector2". Fix the spelling (Vector2.ZERO), or look the member up in the class reference.

AppImage, x86_64. Ubuntu 22.04, Debian 12, Fedora 39 or newer.

Intel or AMD Chromebook, with Linux turned on.

Download for macOSDownload for WindowsDownload for Linux

What Godot is checking

Type.Name is resolved when the script loads: the analyzer looks for a constant, an enum, an enum value or a static member of that name on the type. When none matches, the script stops.

When the name is a Godot 3 member that was renamed, the message adds the new name as a hint.

Reproduce it

Vector2.ZERO typed with the letter O instead of zero.

GDScript
extends Node

func _ready() -> void:
	var velocity = Vector2.ZER0
	print(velocity)

What Godot 4.7.2 prints

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

SCRIPT ERROR: Parse Error: Cannot find member "ZER0" in base "Vector2".
   at: GDScript::reload (res://answers/cannot-find-member-in-base/repro.gd:4)
SCRIPT ERROR: Parse Error: Cannot find member "ZER0" in base "Vector2".
   at: GDScript::reload (res://answers/cannot-find-member-in-base/repro.gd:4)
ERROR: Failed to load script "res://answers/cannot-find-member-in-base/repro.gd" with error "Parse error".
   at: load (modules/gdscript/gdscript_resource_format.cpp:46)

Fix it

The constant's real name.

GDScript
extends Node

func _ready() -> void:
	var velocity = Vector2.ZERO
	print(velocity, " ", Vector2.UP, " ", Vector2.RIGHT)

What the fixed script prints

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

(0.0, 0.0) (0.0, -1.0) (1.0, 0.0)

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.

Prompt
My Godot 4 project prints this error: "Parse Error: Cannot find member "ZER0" in base "Vector2".". Find where it comes from and fix it. The type has no constant, enum value or property by that name. Vector2.ZER0, with a zero typed as the letter O, fails to parse with Cannot find member "ZER0" in base "Vector2". Fix the spelling (Vector2.ZERO), or look the member up in the class reference. Then run the game headless and check that Godot's output no longer shows it.

An enum value from Godot 3

Many engine constants moved into enums or were renamed in Godot 4: KEY_SPACE stayed, but BUTTON_LEFT is MOUSE_BUTTON_LEFT, and Node.PAUSE_MODE_PROCESS is Node.PROCESS_MODE_ALWAYS.

More on this: How to set the window size in Godot 4: get_window().size

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 4122, the message.

Questions

Which Vector2 constants exist?
ZERO, ONE, INF, LEFT, RIGHT, UP, DOWN, and the AXIS_X and AXIS_Y enum values.
Does the error show in the editor?
Yes. The Script editor runs the same analyzer as you type and underlines the member.

Flockbay's agent reads Godot's debugger output and fixes errors like this one in your project, on the official Godot.

Download Flockbay free