What does that mean? Getting "void sendSony(unsigned long data," where?
If it is a compile error please include the entire error message. It is easy to do. There is a button (lower right of the IDE window) called "copy error message". Copy the error and paste into a post in code tags. Paraphrasing the error message leaves out important information.
Is the delay supposed to be part of the if block. If so, there needs to be curly brackets around all of the lines of code that belong in the if block.
this is what comes up in orange writing after clicking verfiey
C:\Users\t\Documents\Arduino\ir_send_2\ir_send_2.ino: In function 'void loop()':
C:\Users\t\Documents\Arduino\ir_send_2\ir_send_2.ino:23:28: warning: 'void IRsend::sendSony(long unsigned int, int)' is deprecated: This old function sends MSB first! Please use sendSony(aAddress, aCommand, aNumberOfRepeats). [-Wdeprecated-declarations]
irsend.sendSony(0x815, 12);
^
In file included from C:\Users\t\Documents\Arduino\libraries\IRremote\src/IRremote.h:191:0,
from C:\Users\t\Documents\Arduino\ir_send_2\ir_send_2.ino:1:
C:\Users\t\Documents\Arduino\libraries\IRremote\src/IRremoteInt.h:538:10: note: declared here
void sendSony(unsigned long data,
^~~~~~~~