Godot Version
4.2.2
Question
I am new to programing so I tried something relatively simple.
I made a movement script, however when I tried to run it, it says “invalid call. Nonexistent function ‘is_action_pressed’ in base ‘Vector2’.”
I don’t know what this means or how to solve it. I believe it has something to do with the variable ‘int’ having a green color rather than red color.
GDScript is case-sensitive. Use Input.is_action_pressed
(with capital I).
Hey, this does seem to change the collor from white to green but the error still shows. and it is in the same code with input.x.
I wonder if there is a connection missing, that I need to resolve?
I got it to work, I had to change out the func get_input(): to a upercase I, and the same with Input.is_action_pressed, like FencerDevLog explained.
now the error does not show, and the game runs with character movement.
Thanks
Your function should work the same with get_input()
lowercase i, maybe you have two functions named get_input
?