Problems with NamedCommands in pathplanner

Hello, we’re trying to program a path with plathplanner and want to use namedcommands in our code. However we’re facing errors we when we register a named command in RobotContainer with:

NamedCommands.registerCommand(“hello”, Commands.print(“hello”));

I have imported NamedCommands into RobotContainer and have restarted vs code but the issue still persists.

Here is a picture of the errors:

Any help in solving this problem is greatly appreciated.

Can you share your code? Preferably as a link to the repo on github or something?

What does the import line look like?

Does the code compile successfully? If so, its just intellisense being dumb and not an actual issue.

1 Like

Sorry I just found the issue I accidentally called the method outside the constructor because I got confused with the parentheses. So it was just a silly syntax error.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.