How i fix this error

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By pixel.anas

when i try to run the game it shows me this error: Invalid call. Nonexistent function ‘is_action_persede’ in base ‘InputDefault’.

this is the code that i am using:

extends KinematicBody2D

var speed = 3

func _physics_process(delta):

if Input.is_action_persede("ui_right"):
	position.x += speed

if Input.is_action_persede("ui_left"):
	position.x -= speed

if Input.is_action_persede("ui_up"):
	position.y -= speed

if Input.is_action_persede("ui_down"):
	position.y += speed

sorry for bad english

You don’t need to write pass if you have any code in the function body. And please mark exuin’s anwser as right.

EnrikeChurin | 2021-08-19 14:16

:bust_in_silhouette: Reply From: exuin

You have a typo. It should be is_action_pressed, not is_action_persede.

Thanks, it’s working

pixel.anas | 2021-08-18 18:37