Edit: I found out it's because some of the functions don't take $gamePlayer as an argument in either the plugin command or script call although that's what your instructions say to do. It will work if you change $gamePlayer to 0.
Here is the console log for the error.