UDP read error

in arduino 22 Udp.readPacket(packetBuffer,UDP_TX_PACKET_MAX_SIZE) error show why????

No semicolon.

this code doesnt compile in arduino 22, compile only arduino 1.0 , but we want 2 used NMEA lib that is not compile in arduino 1.0, so i m in confussion, which arduino setup is comperatable for NMEA nad also ethernet udpreader code, which is given below

[/quote]

#include <SPI.h>
#include <Ethernet.h>
#include <EthernetUdp.h>

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192, 168, 1, 177);

unsigned int localPort = 8888; // local port to listen on

// An EthernetUDP instance to let us send and receive packets over UDP
EthernetUDP Udp;

char packetBuffer[UDP_TX_PACKET_MAX_SIZE]; //buffer to hold incoming packet,

void setup() {
// start the Ethernet and UDP:
Ethernet.begin(mac,ip);
Udp.begin(localPort);

}

void loop() {

int packetSize = Udp.parsePacket();
if(packetSize)
{

// read the packet into packetBufffer
Udp.read(packetBuffer,UDP_TX_PACKET_MAX_SIZE);
Serial.println(“Contents:”);
Serial.println(packetBuffer);
if(packetBuffer==“forward”)
{
Serial.print(“Forward Rece”);
//digitalWrite(pin. HIGH)
}
}}

yes, i m use semicolon also in d code

jeet_jawi:
error show why???

The error message is there to tell you that there is something wrong with your sketch that prevented the compiler from compiling it.

The idea is that by looking at the sketch and the error message you should be able to work out what the problem is and correct it. Of course, this is quite difficult unless you can see the error message as well as the sketch.