Just a general tip for pasting code as sometimes non-visible characters or tabs/spaces can be an issue so screenshot is often no good;
Use code tags (3 backticks before and after the code) like so.
```
Code goes here
on the next line etc
```
Gives;
Code goes here
on the next line etc
Or you could use https://www.pastebin.com/ if the code is particularly long and detailed.