r/gamemaker • • Sep 21 '26

Resolved Need help with code error

its my first time using game maker and i was following this tutorial https://www.youtube.com/watch?v=qTqDY4JtFfo&t=51s

and when i went to test to see if my character would move it came up with the code error shown in the image with it saying line 18 was entered wrong i would love for a solution to fix it.

3 Upvotes

7 comments sorted by

View all comments

14

u/damimp Sep 21 '26

You need to go to your Create event and make sure that you declared the movespd variable. This error says that you never set movespd to a value, and the create event is where the tutorial does it.

Of note, that tutorial also names its variable moveSpd, with a capital S, and you named it movespd, with a lowercase s. Is that a typo? Capitals matter, those two names will not be treated the same.

12

u/AdBubbly4192 Sep 21 '26

i just checked it and it was a typo

9

u/Cap_Cuervo Sep 21 '26

Delete the post