That's not the code for the current version of StarCursor. It was updated on Curseforge back on October 19th. Try updating it first.
If it doesn't work after updating, the only suggestion I have is adding the following line under GetCursorPosition:
Code:
x, y = GetCursorPosition();
if not x or not y then return end