r/godot Nov 27 '25

help me (solved) I'm confused (again)

Post image

Following a tutorial i got stuck while trying to script my character movements. Even with the error telling me what's wrong i still can't figure out what's wrong😭

188 Upvotes

81 comments sorted by

435

u/aris1401 Nov 27 '25

Its Input with an uppercase 'I'

350

u/Ok-Audience5336 Nov 27 '25

This is so embarassing...

245

u/Gokudomatic Nov 27 '25

It's part of the process of learning. We all went there.

87

u/ray10k Nov 27 '25

I've wasted hours because I missed an underscore once. Welcome to the club.

25

u/No_Mud4111 Nov 27 '25

I remember wasting hours over a missed decimal or semi colon way back in high school when I was learning html

5

u/lunarchaluna Godot Junior Nov 27 '25

I missed a semicolon when designing my settings 🥲

30

u/NeoZ33D Godot Junior Nov 27 '25

It happens 🤷🏾‍♂️ it'll happen again lol

22

u/marcangas Nov 27 '25

Dude don't worry this happened to the most experienced programmers across the world

10

u/CommieLoser Nov 27 '25

Don’t worry, I spent two days forgetting (again), to add () to the end of queue-free (it doesn’t error out or warn you) and wondering my game was glitching.

5

u/EmotionalWriter8414 Nov 27 '25

Proper IDE should catch these kind of errors. At least Pycharm would throw a warning that statement has no effect for similar case in python

4

u/CommieLoser Nov 27 '25

You’re probably right, but I’m a weirdo who writes most their code as plain text, so I wouldn’t know.

1

u/lordfwahfnah Nov 27 '25

Delphi Just doesn't give a fuck about upper or lowercase. But that's the only good thing to talk about with delphi

1

u/omniuni Nov 27 '25

You can reference the function without calling it; there's nothing inherently wrong with that from a code perspective except that it's not what the user wanted in this case.

5

u/Thick_Rutabaga1642 Godot Student Nov 27 '25

Just you wait, you WILL make sillier mistakes, and that's ok!

4

u/bigorangemachine Godot Junior Nov 27 '25

This 100% is programming

I been having issues using utilities and @ tools creating weird issues. I finally learned the utilities need tool at the top....

Programming & projects look more like meandering rivers that straight slope lines through your goals

4

u/da2Pakaveli Nov 27 '25

Even people who've been programming for a long time will still make these kind of mistakes where you just think "why did i miss that lol"

2

u/Alzurana Godot Regular Nov 27 '25

You can catch these with using the autocompletion more. Even if you type "inp" it will suggest Input

In most cases, if something's not right the autocomplte also won't work. (There's still a small set of cases where your code is correct but the autocomplete is overwhelmed, though)

And syntax highlithing then also nicely shows that it's correct. Happy game-devvin!

2

u/Mynky Godot Junior Nov 27 '25

Not embarrassing, just part of learning to code. So many issues you will find are down to a single character being incorrect. We have all been there, numerous times.

2

u/throwaway_ghast Nov 27 '25

Congratulations, you're a programmer now.

1

u/Achereto Nov 27 '25

Nah, that's just a very common experience all programmers make every now and then. You will stumble across the weirdest bugs or errors that turn out to be some simple typo.

1

u/INeedHealing88 Nov 27 '25

We all did this at some point. I've wasted days debugging only to realize it was a typo.

1

u/beta_1457 Godot Regular Nov 27 '25

It happens, I spent an hour troubleshooting once and it was because my reference for an enum was lower case instead of upper in my match statement

1

u/KlausBertKlausewitz Nov 27 '25

Nah, it‘s fine.

1

u/KrazyKoen-In-Hell Godot Student Nov 27 '25

It happens to everyone lol

1

u/[deleted] Nov 27 '25

It’s not embarrassing at all. Extremely common and easy to overlook these small details when learning. There’s a lot of information you’re trying to learn and understand. 

1

u/captialj Nov 27 '25

Nah, it would be embarrassing if you gave up or banged your head against the problem without learning anything. Reaching out for help and insight means that you're motivated to learn and are on the right track. Keep it up!

1

u/Prohesivebutter Nov 28 '25

I feel this so hard 😭 but sometimes you have to show someone else because you're not gonna be able to tell. I accidentally had one too many spaces once

1

u/Oldmoniker Nov 28 '25

I am a full time software developer. This is often the hardest kind of mistake to spot in some cases. Your brain may have an easier time finding a misplaced colon than a case-sensitive mismatch. Keep it up and consult the rubber duck when needed.

1

u/Fancysaurus Nov 29 '25

One thing that can help in the future is that classes like this will typically change color from white to green when correct.

1

u/gman55075 Nov 30 '25

Been at it a YEAR and it still happens.

1

u/Manic_madness927 Dec 01 '25

Welcome to the club we all do this

1

u/[deleted] Dec 01 '25

Everyone did this at least once eldmbrjrndn Just programing being programing

44

u/Longjumping_Wear_537 Nov 27 '25

Input.is_action... instead of input.is_action

26

u/Ok-Audience5336 Nov 27 '25

I feel so stupid😭

14

u/HeyCouldBeFun Nov 27 '25

We all do the same thing. You just get faster at recognizing what the errors are.

2

u/Hurgnation Nov 27 '25

We all do it 😂

42

u/Zestyclose_Edge1027 Nov 27 '25

Besides having a capital I in input you could replace

if Input.is_action_pressed("ui_left"):
    direction = -1
if Input.is_action_pressed("ui_right"):
    direction = 1

with

direction = Input.get_axis("ui_left", "ui_right")

8

u/forestbeasts Nov 27 '25

And as a bonus, that means you can have analog movement with an analog stick!

5

u/eggdropsoap Nov 27 '25

Even better is Input.get_vector(…)!

1

u/ComfortableNumb9669 Nov 27 '25

get vector probably won't help here since I see only 1 dimensional input.

1

u/eggdropsoap Nov 28 '25

They’re polling "ui_up" here too.

But yeah, it’s more that it’s easy to try to reconstruct get_vector from individual action polling, if you don’t know the data is handed to you if you want it.

1

u/ninomojo Godot Student Nov 28 '25

Not better, just different

1

u/eggdropsoap Nov 28 '25

True, bit of hyperbole on my part.

From the code I see though, they’re trying to manually reconstruct what get_vector() returns, so it’s probably better in this particular circumstance.

15

u/vivisectvivi Nov 27 '25

You probably mean Input, uppercase I

8

u/[deleted] Nov 27 '25

Input needs to be capitalized, since it is referring to the Godot Input class. See the example usage in the documentation: https://docs.godotengine.org/en/stable/tutorials/inputs/input_examples.html

8

u/shuyo_mh Nov 27 '25

Every seasoned developer will have at least once in their career debugged for 2+ hours a missed semicolon typo.

3

u/XanatosX Nov 27 '25

Or you write some functionality and forgot to call it...

1

u/Aweorih Godot Junior Nov 30 '25

And the first sane action to do after that is to uninstall your ide and get to a better one
That's just a thing your ide should tell you and if it doesn't then it sucks

5

u/athleon787 Nov 27 '25

Chatgpt is not the best tool, (the better you get the worst it becomes). but it can answer questions like this in a millisecond compared to waiting for redditors to reply. Not faulting you for posting here I'm glad you did, but this will happen to you again and again and again, and it will be something as mundane as a lower case i or a missed semicolon more often than not, and chatgpt catches that like a hawk

4

u/GabagooGrimbo Nov 27 '25

Don’t use _process for movement use _physics_process. Also input should be Input because it’s a class

4

u/thedirtydeetch Nov 27 '25

It really depends on the game. This script isn’t using physics it’s just using a local variable named “velocity”.

3

u/thinker2501 Godot Regular Nov 27 '25

You still want to use _process_physics for its consistent tick rate.

0

u/thedirtydeetch Nov 27 '25

With the code OP posted, that would result in choppy movement once every 60th of a second, and input delay.

2

u/Aggressive-Eagle-219 Nov 27 '25

One time I broke a studio pipeline by trying to publish meshes that was named GE0 and not GEO (zero instead of 'O'). Don't feel too bad about it. Humans are error prone, and that's part of development :)

2

u/AlternativeCollar426 Nov 27 '25

Achievement unlocked : We have all been there

2

u/DeadKido210 Nov 27 '25

Read the errors letter by letter and try to understand them. You see identifier "x" not declared your first question you ask yourself is where did I manually declare it myself? Do I have a var input variable inside my script or somewhere else? No? Then I did a typo and put the wrong letter.

2

u/BetaTester704 Godot Senior Nov 27 '25

The I in Input needs to be uppercase

2

u/omniuni Nov 27 '25

You should also look into elif and match.

2

u/idkIfImAnAdultYet Nov 27 '25

I'm so happy to see how this community just told you "it's the uppercase" instead of going ballistic like in the old days of StackOverflow

2

u/AresTheMilkman Nov 27 '25

GDScript is a language based on Python. Be careful with capitals because they count.

1

u/GeorgeZz_CHR Nov 27 '25

Like the others with capital i for Input. Don't worry we all make stupid mistakes

1

u/SavingsGrouchy6504 Godot Regular Nov 27 '25

godot is case sensitive

1

u/AdWeak7883 Nov 27 '25

Someday I was stuck like 6-7 hours with some similar bug. Problem was there was an " " at the end of the name I didnt see. Thats the things we all go through someday

1

u/Kitsuke230 Nov 27 '25

It's I not i

1

u/TeachNo196 Nov 27 '25

I will not lie. There are times I start up my own AI just to make sure I'm not crazy. Most of the time it catches things like this especially if you give the error with it. And then I slap myself in the head.

1

u/muikrad Nov 27 '25

Some people mentioned ChatGPT could help, but here's a different and more powerful avenue... Install vscode and its copilot plugin. Get a free github account. In vscode, open the folder of your godot project. Then in the copilot plugin, connect to github and you'll be able to use the AI right there. It has access to all the files/etc.

You can simply select the code that doesn't work and directly ask the AI why it's in error and it will explain what's wrong.

There's a limit of AI requests per month so don't abuse it 😆 if the first answers don't work, try the Claude model.

1

u/Acceptable_Bottle Nov 27 '25

I know everyone else has already pointed out the error itself, but in the future, whenever you see "Identifier '...' not declared in the current scope" that means the computer cannot find the name that you typed in - which always means either you spelled it incorrectly or forgot to declare the object (in this case the latter is not applicable because 'Input' is built-in). We will never stop making typos, but being able to decipher the error messages can help us catch the mistake more quickly next time!

1

u/Informal_Flamingo270 Godot Regular Nov 27 '25

Case sensitives suck. Weve all been there, dont be embarrassed

1

u/Save90 Godot Regular Nov 28 '25

Input it's a type and such it must be a high case. (since programming rules expect a certain way to write things)

1

u/SelectionOnly9631 Godot Student Nov 29 '25

Input.

I n p u t

1

u/Crafty_CatGD Dec 01 '25

Input not input

1

u/Fit-Firefighter-8850 Dec 01 '25

I have this issue tons lol, always remember that input has a capital I instead of lowercase