Yo! I implemented this in my game about a week ago, and there are a few things to look out for with this tutorial (it is technically outdated as of the current gamemaker version, but will still work, there are just some formatting issues).
It looks like your syntax errors might be caused by not putting "_" with the variables (you can't use spaces, I'm assuming you didn't only because it shows up as yellowed text but just in case),
The other thing... make sure you put the semi-colons after writing your lines, that could cause issues with the system reading the code seeing as how semi-colons tell the system that the line has stopped.
Further, in the tutorial, you'll be making scripts, make sure to see how to format scripts now, (when he says to make a new script, name the script immediately whatever you want to name it, or else, you will need to change the "function ScriptX() {" to "function _______(name of your script)() {" and then write the script code within that function!