0 votes

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

this is the code that i am using:

extends KinematicBody2D

var speed = 3

func physicsprocess(delta):

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

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

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

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

pass

sorry for bad english

Godot version 3.3.2
in Engine by (12 points)

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

1 Answer

+3 votes

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

by (7,190 points)

Thanks, it's working

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.