1
\$\begingroup\$

I'm currently using gamemaker studio 2 following a youtube guide on making my first game. I am very new to coding and need some help.

Im getting this error message attached to my code and I'm not sure why.

enter image description here

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Can we assume this persists after saving? \$\endgroup\$
    – Weckar E.
    Commented Apr 19, 2017 at 6:59
  • 1
    \$\begingroup\$ Use double quote " instead single ': dash_key = keyboard_check_pressed(ord("C")); \$\endgroup\$
    – Dmi7ry
    Commented Apr 21, 2017 at 4:34

1 Answer 1

1
\$\begingroup\$

It should be

dash_key = keyboard_check_pressed(ord("C"));

Note the double quotes ( " ) instead of single quotes ( ' ). If done correctly the "C" should be yellow in the editor to signify that a string is present.

\$\endgroup\$
1
  • \$\begingroup\$ This doesn't explain why the engine thinks there are 0 arguments instead of 1. Furthermore, ord is a function that takes in a character, not a string. \$\endgroup\$
    – user64742
    Commented Dec 28, 2018 at 7:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .