433mhz problems

Hello,
i wrote this code to sent numbers via 433mhz. I want them only to be sent when either pin 10 or 11 are on HIGH. And even if disconnect pin 10 and 11, the numbers are still send although the if-function is wrong. It cant be a hardware-problem because everything works with other codes, which i cant use for this projekt.

#include <VirtualWire.h>

#undef int
#undef abs
#undef double
#undef float
#undef round

int data = 10;
int data2 = 11;

void setup() {
pinMode(data, INPUT);
pinMode(data2, INPUT);
pinMode(3, OUTPUT); //VCC for 433mhz
pinMode(2, OUTPUT); //GND for 433mhz
digitalWrite(3, HIGH); //VCC for 433mhz
digitalWrite(2, LOW); //GND for 433mhz

vw_set_ptt_inverted(true); // Required for RF Link module
vw_setup(2000); // Bits per sec
vw_set_tx_pin(4);
}

void loop() {
if(data, HIGH){
const char *msg = “1”; // this is your message to send
vw_send((uint8_t *)msg, strlen(msg));
vw_wait_tx(); // Wait for message to finish
delay(200);}

if(data2, HIGH){
const char *msg = “2”; // this is your message to send
vw_send((uint8_t *)msg, strlen(msg));
vw_wait_tx(); // Wait for message to finish
delay(200);}
}

Does anybody know how to fix this?
If you have other SIMPLE codes for 433mhz, to sent numbers, please tell me :slight_smile:

  if(data, HIGH){

What is this nonsense? That is NOT how to compare the state of a pin to a value.

  if(data, HIGH){

What's that?
Have you seen any code like that in the examples?

Please remember to use code tags when posting code
(sp. 'MHz")

Edit:oopsie

Please remember to use coffee tags when posting code

Especially when posting Java code.