Why won't this code work?

Here's the code:
files.me.com/elijahwood/hm3zf6

I keep getting this error:
error: no matching function for call to 'TimeAlarmsClass::alarmRepeat(int, int, int, void (&)())'

then...

/Users/elijahwood/Documents/Arduino/libraries/TimeAlarms/TimeAlarms.h:55: error: expected ',' or '...' before numeric constant

/Users/elijahwood/Documents/Arduino/libraries/TimeAlarms/TimeAlarms.h:56: error: expected ',' or '...' before numeric constant

/Users/elijahwood/Documents/Arduino/libraries/TimeAlarms/TimeAlarms.h:59: error: expected ',' or '...' before numeric constant

/Users/elijahwood/Documents/Arduino/libraries/TimeAlarms/TimeAlarms.h:60: error: expected ',' or '...' before numeric constant

/Users/elijahwood/Documents/Arduino/libraries/TimeAlarms/TimeAlarms.h:63: error: expected ',' or '...' before numeric constant

/Users/elijahwood/Documents/Arduino/libraries/TimeAlarms/TimeAlarms.h:66: error: expected ',' or '...' before numeric constant

In function 'void setup()':
error: no matching function for call to 'TimeAlarmsClass::alarmRepeat(int, int, int, void (&)())'/Users/elijahwood/Documents/Arduino/libraries/TimeAlarms/TimeAlarms.h:54: note: candidates are: AlarmID_t TimeAlarmsClass::alarmRepeat(time_t, void (*)())

/Users/elijahwood/Documents/Arduino/libraries/TimeAlarms/TimeAlarms.h:55: note: AlarmID_t TimeAlarmsClass::alarmRepeat(int)

/Users/elijahwood/Documents/Arduino/libraries/TimeAlarms/TimeAlarms.h:56: note: AlarmID_t TimeAlarmsClass::alarmRepeat(timeDayOfWeek_t, int)

It also high lights this:
Alarm.alarmRepeat(7,0,0, FishTankLightOn); // 7:00am every day

Any ideas?

Thanks,
Elijah

Post your code, in a code box (using the # in the post editor).
Then maybe someone can help.

It is highly unlikely to be something in an Arduino library header file, and more likely to be your code

Yah it's deffinatly in my code...I wish I could, my code has 6 tabs so I can't put it In a code box. If you click on the link that I gave in my previous post then you'll get a zip file with the code.

  1. Can you use find and replace to get the tabs under control?
  2. Use Edit->Copy for forum if necessary
  3. I don't download random zips and open them. Raw file or nothing for me I'm afraid. If it is so huge that it needs to be zipped, then I'm unlikely to read it. Sorry

Well the tabs for me are just to help me organize everything and can't really move them or take them away. Why can't you open zip files? Also, I tried to copy to forum but it uses to many characters...

Can I attach anything to these posts?

Here's the first tab you might be able to find the problem here....

#include <WString.h>
#include <Ethernet.h>
#include <string.h>
#include <SoftwareSerial.h>
#include <Servo.h> 
#include <x10.h>
#include <x10constants.h>  
#include <Time.h>
#include <TimeAlarms.h>
#include <Ethernet.h>
#include <UdpBytewise.h>  // UDP library from: bjoern@cs.stanford.edu 12/30/2008 

#if  UDP_TX_PACKET_MAX_SIZE < 64 ||  UDP_RX_PACKET_MAX_SIZE < 64
#error : UDP packet size to small - modify UdpBytewise.h to set buffers to 64 bytes
#endif

#define TAG_LEN 12 //for rfid

#define MAX_STRING_LEN  20 //for weather
char tagStr[MAX_STRING_LEN] = "";
char dataStr[MAX_STRING_LEN] = "";
char tmpStr[MAX_STRING_LEN] = "";
char endTag[3] = {'<', '/', '\0'};
int len;
char* weatherTemp;
char* weatherHumidity;
char* weatherPressure;

// Flags to differentiate XML tags from document elements (ie. data)
boolean tagFlag = false;
boolean dataFlag = false;

char tag[12] = {'0', '8', '0', '0', 'E', '1', '0', 'F', 'E', '9'}; //0800E10FE9 this is the valid rfid tag
char code[12]; 
int bytesread = 0;  
int val=0;
 
Servo myservo; //declares servo

#define THERMISTOR_PIN 4
#define NUMTEMPS 20
short temptable[NUMTEMPS][2] = {
   {1, 841},
   {54, 255},
   {107, 209},
   {160, 184},
   {213, 166},
   {266, 153},
   {319, 142},
   {372, 132},
   {425, 124},
   {478, 116},
   {531, 108},
   {584, 101},
   {637, 93},
   {690, 86},
   {743, 78},
   {796, 70},
   {849, 61},
   {902, 50},
   {955, 34},
   {1008, 3}
};



prog_char string_0[] PROGMEM = "";
prog_char string_1[] PROGMEM = "";
prog_char string_2[] PROGMEM = "";
prog_char string_3[] PROGMEM = "";
prog_char string_4[] PROGMEM = "";
prog_char string_5[] PROGMEM = "";
prog_char string_6[] PROGMEM = ""; 
prog_char string_7[] PROGMEM = "";
prog_char string_8[] PROGMEM = "";
prog_char string_9[] PROGMEM = "";
prog_char string_10[] PROGMEM = "";
prog_char string_11[] PROGMEM = ""; 


PROGMEM const char *string_table[] = 
{
};

char buffer[85]; 

byte mac[] = { 0x33, 0x25, 0x71, 0x33, 0x38, 0x40 }; // whatever mac you want
byte ip[] = { 192, 168, 1, 247 }; //My IP
byte yahoo[] = { 98, 136, 86, 109 }; // Mail server address  (this is for yahoo's mobile smtp)
byte cameraserver[] = { 96, 232, 159, 55 };
byte weatherserver[] = { 140, 90, 113, 200 }; // www.weather.gov
byte SNTP_server_IP[]    = { 192, 43, 244, 18}; // time.nist.gov

time_t prevDisplay = 0; // when the digital clock was displayed
const  long timeZoneOffset = 0L;

String inString = String(35);

Server server(80); //my server
Client pantiltcam(cameraserver, 81); //camera server
Client client(yahoo, 587);  // yahoo's mobile smtp server ip/port
Client weathersystem(weatherserver, 80);


int clockval;

unsigned long lastFeeding = 0;
unsigned long lastLight = 0;

String msg="";
int tam=0;

byte nolines = 1;

///////////////////////////////////////////////////////
//////////////////PINS/////////////////////////////////
///////////////////////////////////////////////////////
int LED = 22;
int switch1 = 24;
int switch2 = 26;
int alarm = 33; //from door 
int doorPin = 34; //for rfid lock for door
int PIR = 35;
int powerPin = 36;

int rfidPin = 4; // RFID enable pin connected to digital pin 2
int ledPin = 5; // for RFID
//servo = 6;
#define zcPin 2
#define dataOutPin 3

int temp = 4; //analog 4
///////////////////////////////////////////////////////
///////////////////////////////////////////////////////
///////////////////////////////////////////////////////

x10 myHouse =  x10(zcPin, dataOutPin);
 
void clearLCD(){  
Serial1.print(0xFE, BYTE); //command flag 
Serial1.print(0x01, BYTE); //clear command. // 
}
void firstrow(){ 
Serial1.print(0xFE, BYTE); 
Serial1.print(0x03, BYTE); 
delay(2); 
} 
void secndtrow(){ 
Serial1.print(0xFE, BYTE); 
Serial1.print(0xC2, BYTE); 
delay(2); 
} 

void setup()
{
  
 Serial1.begin(9600); //lcd
 Serial2.begin(2400); //rfid
 Serial3.begin(9600); //xbee communication
 
 pinMode(rfidPin,OUTPUT);   // Set digital pin 2 as OUTPUT to connect it to the RFID /ENABLE pin
 pinMode(ledPin,OUTPUT); // Set ledPin to output
 pinMode(switch1, INPUT);
 pinMode(switch2, INPUT);
 pinMode(LED, OUTPUT);


 myservo.attach(6);  // attaches the servo on pin 9 to the servo object 
 myservo.write(0); //put servo in nuetral if it isnt already
 
 Ethernet.begin(mac, ip);
 server.begin();
 
 clearLCD();
 
 firstrow();
 Serial1.print("Connecting");
 delay(1000);
 Serial1.print(".");
 delay(1000);
 Serial1.print(".");
 delay(1000);
 Serial1.print(".");
 delay(500);
 
setSyncProvider(getNtpTime);
while(timeStatus()== timeNotSet); 

Alarm.alarmRepeat(7,0,0, FishTankLightOn);  // 7:00am every day
Alarm.alarmRepeat(16,0,0, FishTankLightOff);  // 4:00pm every day 
Alarm.alarmRepeat(7,0,0, FishTankFeed);  // 7:00am every day 

if (client.connect() ) {
  
   secndtrow();
   Serial1.print("Connected"); 
   delay(1000);  
  
   client.println("EHLO MYSERVER");
   client.println("AUTH PLAIN AG15cmVwcmFwaW5mb0B5YWhvby5jb20AZHJ1bW1lcg=="); 
   client.println("MAIL FROM:<myreprapinfo@yahoo.com>");
   client.println("RCPT TO:<drummerboyx@verizon.net>");
   client.println("DATA");
   client.println("From: <myreprapinfo@yahoo.com>");
   client.println("TO: <drummerboyx@verizon.net>");
   client.println("SUBJECT: HouseBot");
   client.println();
   client.println("HouseBot has just been activated");
   client.println("Sincerly, HouseBot");
   client.println(".");
   client.println(".");
   client.println("QUIT");
                        
   client.stop();
   
   clearLCD();
   firstrow();
   Serial1.print("Email sent");
   
  if (weathersystem.connect()) {
    weathersystem.println("GET /xml/current_obs/KLGA.xml HTTP/1.0");    
    weathersystem.println();
  } 
   
}

 clearLCD();
 firstrow();
 Serial1.print("Starting");
 delay(1000);
 Serial1.print(".");
 delay(1000);
 Serial1.print(".");
 delay(1000);
 Serial1.print(".");
 delay(500);
 clearLCD();
 
myHouse.write(A, ALL_UNITS_OFF, 3); //turn all lights off

myHouse.write(A, UNIT_2, 3);               
myHouse.write(A, ON, 3);

/////xbee setup///////////

 /*Serial3.print("X");
  delay(1100);
  Serial3.print("+++");
  delay(1100);

if (returnedOK() == 'T') {
  }
  else {
    setup(); 
  }

  Serial3.print("ATID8246,"); //unique number
  
  Serial3.println("ATWR");
 
if (returnedOK() == 'T') {
  }
  else {
    setup();
  }
  
/////////////////////////

   Serial3.print('1'); //relock the door
*/

}

void loop() {

clearLCD();
firstrow();
Serial1.print("Program ready");

indicator();
RFID(); 

webserver(); //webserver code

  if( now() != prevDisplay) //update the display only if the time has changed
  {
    prevDisplay = now();
    digitalClockDisplay();  
  }

if (digitalRead(switch1) == HIGH) {
     
       myservo.write(180); 
       delay(1000);
       myservo.write(0); 
       delay(1000);
       myservo.write(180); 
       delay(1000);
       myservo.write(0); 
       delay(1000);

   
   clearLCD();
   firstrow();
   Serial1.print("Manual feeding");
   secndtrow();
   Serial1.print("activated");
   delay(1000);
  
   Client client(yahoo, 587);
  
if (client.connect()) {
   client.println("EHLO MYSERVER");
   client.println("AUTH PLAIN AG15cmVwcmFwaW5mb0B5YWhvby5jb20AZHJ1bW1lcg==");  
   client.println("MAIL FROM:<myreprapinfo@yahoo.com>");
   client.println("RCPT TO:<drummerboyx@verizon.net>");
   client.println("DATA");
   client.println("From: <myreprapinfo@yahoo.com>");
   client.println("TO: <drummerboyx@verizon.net>");
   client.println("SUBJECT: HouseBot");
   client.println();
   client.println("You have manually fed the fish");
   client.println("Sincerly, HouseBot");
   client.println(".");
   client.println(".");
   client.println("QUIT");
   client.stop();
   
clearLCD();
firstrow();
Serial1.print("Email sent");
delay(5000);
clearLCD();

 }
 
 clearLCD();

 }

}

void indicator() {
  digitalWrite(LED, HIGH);
  delay(1000);
}

char returnedOK () {
  char incomingChar[3];
  char okString[] = "OK";
  char result = 'n';
  int startTime = millis();
  while (millis() - startTime < 2000 && result == 'n') {  
    if (Serial.available() > 1) {
      for (int i=0; i<3; i++) {
        incomingChar[i] = Serial.read();
      }
      if ( strstr(incomingChar, okString) != NULL ) { 
        result = 'T'; 
      }  
      else {
        result = 'F'; 
      }
    }
  }
  return result;
}

Where are the definitions of the callback functions you used: FishTankLightOn, FishTankLightOff, FishTankFeed?

Alarm.alarmRepeat(7,0,0, FishTankLightOn); // 7:00am every day
Alarm.alarmRepeat(16,0,0, FishTankLightOff); // 4:00pm every day
Alarm.alarmRepeat(7,0,0, FishTankFeed); // 7:00am every day

This is a duplicate thread, the cause of the error and a solution was posted in this thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1272034771/29#29

myreprapinfo, please close one of these threads.