Wiichuck library problem

My problem is about how you would write that if button C on a wii nunchuck is pressed in Arduino language.
I want Arduino to know that if button C is pressed, then should a servo move 20 degrees. When i'm writing it like this I get an error.

      if (wii.buttonC(1)); { 

(1 stands for magnetization on)

This is my error:

Arduino:1.8.2 (Windows 7), Kort:"Arduino/Genuino Uno"

C:\Users\Isac\Desktop\p_sklov_kod\p_sklov_kod.ino: In function 'void loop()':

p_sklov_kod:91: error: cannot convert 'Wiichuck::buttonC' from type 'uint8_t (Wiichuck::)() {aka unsigned char (Wiichuck::)()}' to type 'bool'

       if (wii.buttonC); { //when button C is pressed


exit status 1
cannot convert 'Wiichuck::buttonC' from type 'uint8_t (Wiichuck::)() {aka unsigned char (Wiichuck::)()}' to type 'bool'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

How can I write so that a servo moves 20 degrees if buttonC is pressed.

I solved it!!!!
This is the final code:

int buttonC = wii.buttonC();

if (buttonC = HIGH); { //when button C is pressed
vertServo.write(20);//a servo turns 20 degrees
delay(1500);//wait 1,5 seconds
vertServo.write(20);//servo turns back 20 degrees

That will NOT have solved it....

if (buttonC = HIGH); { //when button C is pressed

Will return true, no matter what. Spot the error?

And for the next time, read How to use the forum please. Always use code tags (not only is the start post) and no snippets.

And about the problem, the error you show shows different code then you give us. Naughty naughty boy (/gal) :wink: