You probably have typing errors somewhere. Go fix them. Here’s how:
The complete error message contains everything you need to know to fix the error yourself.
The important parts of the error message are:
the description of the error itself (google this; you are NEVER the first one!)
the file it occurred in (critical!)
the line number and character position (the two numbers in parentheses)
also possibly useful is the stack trace (all the lines of text in the lower console window)
Always start with the FIRST error in the console window, as sometimes that error causes or compounds some or all of the subsequent errors. Often the error will be immediately prior to the indicated line, so make sure to check there as well.
Look in the documentation. Every API you attempt to use is probably documented somewhere. Are you using it correctly? Are you spelling it correctly?
All of that information is in the actual error message and you must pay attention to it. Learn how to identify it instantly so you don’t have to stop your progress and fiddle around with the forum.
Remember: NOBODY here memorizes error codes. That’s not a thing. The error code is absolutely the least useful part of the error. It serves no purpose at all. Forget the error code. Put it out of your mind.
If you can’t see the errors in the console, make sure your log console selector buttons are enabled. See this graphic:
If you have an existing compile error somewhere Unity won’t compile the rest of your code correctly until that error has been resolved which means any scripts you’ve created with the error present are being treated as if they don’t actually have code in them because they’ve not yet been compiled the first time.
Check the console. If an error message isn’t in it make sure that they aren’t being hidden (there is an octagon on the right side of it that should be lit up red when they’re set to visible).
You do have some typos in your script and thus it does not compile. Sadly these computers are VERY pedantic when it comes to code. As Kurt likes to say “you have to be perfect” when copying scripts from tutorials. May I suggest you read this article.
Here is the fix for you:
private void Awake()
{
_currentMap = PlayerInput.currentActionMap; // Typo in here. It should be "currentActionMap"
_moveAction = _currentMap.FindAction("Move");
_lookAction = _currentMap.FindAction("Look");
_runAction = _currentMap.FindAction("Run");
_moveAction.performed += onMove; // Typo in here. The word is spelled perfoRmed
_lookAction.performed += onLook; // same
_runAction.performed += onRun; // same
_moveAction.canceled += onMove;
_lookAction.canceled += onLook;
_runAction.canceled += onRun;
}
Also, your map(line 55) will never be enabled because it is tied to a method called OnEnabled(), which needs to be called… Not to be confused with OnEnable() that is automatically called when the object this script is on is enabled and active.