What should I do when I enter my scripts for W, A, S, D controls say "Identifier Not Found"

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By FightNite
:warning: Old Version Published before Godot 3 was released.

Be more descriptive on your question, content should detail the problem, also add tags.

Without that you will only get guesses as answers.

eons | 2017-11-12 23:23

:bust_in_silhouette: Reply From: flipfootbunny1929

idk! i am having the same problamo, so i will search the web, and comment back on yours if i find an answer! plz comment on mine plz!

:bust_in_silhouette: Reply From: rustyStriker

Identifier not found means you are missing a declaration of a variable or misspelled something, check the line it says the error occurs in and search for mistakes/undefined variables

thanks you bro! i am working with him on this game, and this means alot!:slight_smile:

GhostBall338 | 2017-11-11 01:37

:bust_in_silhouette: Reply From: GunPoint

Please, provide more information. Like:
What Godot version you use?
Whats your scipt like?

I used the latest versions of Godot and I had looked at a YouTube video to help me with the scripts, since I am a 7th grader and new to this, and it is titled “Godot Tutorial-WASD Move Character and Import Texture” I had tried to replicate exactly what he did and for the video it had worked, as for me, it had failed and gave me the problem that I have posted.

FightNite | 2017-11-10 20:22

:bust_in_silhouette: Reply From: gonzo191

It would help if you provided a snippet of the problematic code. Identifier not found simply means you’re using an unknown property be it variable or say key id.

As for keyboard input, WASD controls can be done like this

func _process(delta):
  # vertical
  if Input.is_key_pressed(KEY_W): # do action here
  elif Input.is_key_pressed(KEY_S): # do action here

  # horizontal
  if Input.is_key_pressed(KEY_A): # do action here
  elif Input.is_key_pressed(KEY_D): # do action here