Help,no matching function for call to 'Adafruit_NFCShield_I2C::readPassiveTarget

Hey all, been getting this error here and I can't seem to find the answer for it. I'm using the same code from the example and it doesn't give any errors. Does it have something to do with my libraries?

Thanks

The Error

Learning_PN532:9: error: expected unqualified-id before numeric constant
Learning_PN532.ino: In function 'void loop()':
Learning_PN532:19: error: no matching function for call to 'Adafruit_NFCShield_I2C::readPassiveTargetID(int, uint8_t*)'
F:\Arduino-1.0.5-r2\libraries\AdafruitNFCShieldI2Cmaster/Adafruit_NFCShield_I2C.h:172: note: candidates are: boolean Adafruit_NFCShield_I2C::readPassiveTargetID(uint8_t, uint8_t*, uint8_t*)
Learning_PN532:20: error: invalid conversion from 'byte' to 'const void*'
Learning_PN532:20: error: initializing argument 2 of 'int memcmp(const void*, const void*, size_t)'

The Code

#include <Wire.h>
#include <Adafruit_NFCShield_I2C.h>
#define IRQ   (2)
#define RESET (3)
Adafruit_NFCShield_I2C nfc(IRQ, RESET);

int greenLED=8;
int redLED=9;
byte goodCard=0x64,0x40,0xB1,0x76;

void setup(){
  nfc.begin();
  pinMode(greenLED,OUTPUT);
  pinMode(redLED,OUTPUT);
}
void loop(){
  boolean success;
  uint8_t uid[] = {0,0,0,0,0,0,0};
  success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &uid[0]);
  if(memcmp(uid, goodCard, sizeof(goodCard))){
    digitalWrite(greenLED,HIGH);
    delay(1000);
    digitalWrite(greenLED,LOW);
  }
  else{
    digitalWrite(redLED,HIGH);
    delay(1000);
    digitalWrite(redLED,LOW);
  }
}

Perhaps there's more than one version of the library? Look at the .h file you are
actually #including.

Change

byte goodCard=0x64,0x40,0xB1,0x76;

to

byte goodCard[] ={ 0x64,0x40,0xB1,0x76 };
 if(memcmp(uid, goodCard, sizeof(goodCard))){

If uid[] has 7 elements and goodCard[] has 4 elements, the chance that the memcmp() returns 0 is pure serendipity. While I don't have the library, it appears that the compiler is expecting 3 arguments on the call to readPassiveTargetID(), but your code only supplies two. Are you sure you have the right method?

[my edit]
Nope...I reversed the element counts in my head. The memcmp() is okay, but only examines the first 4 bytes of the uid[] array.

byte goodCard[] ={ 0x64,0x40,0xB1,0x76 };

Thanks for that!

If uid[] has 7 elements and goodCard[] has 4 elements, the chance that the memcmp() returns 0 is pure serendipity. While I don't have the library, it appears that the compiler is expecting 3 arguments on the call to readPassiveTargetID(), but your code only supplies two. Are you sure you have the right method?

Yeah that seems to have been the problem. It was looking for '&uidLength', the third argument. I never put it there cause I thought I don't need to know the length of the ID. Guess the code needed it instead.

Cool, Thanks you guys!