Pulse Works Studio

Parse Error: Function "set_cellv()" not found in base TileMap.

TileMap.set_cellv() was removed. Cells are set with a layer and a Vector2i.

Cause

Godot 4 TileMaps have layers and atlas sources. set_cellv(position, tile) does not exist. set_cell takes the layer, the cell coordinate, the source id, and the atlas coordinate.

Fix

extends TileMap

func paint(cell: Vector2i) -> void:
	set_cell(0, cell, 0, Vector2i(1, 0))

func erase(cell: Vector2i) -> void:
	erase_cell(0, cell)

Related

Godot Dev Tools is a Pulse Works Studio project. All error explainers.