myGLCD.print(Serial);

im trying to print the tx from my arduino to a mcufriend utft screen. i found some code on the forum that will print what i type into the serial from the pc but it wont print the serial data FROM the arduino.

char string[32];
char byteRead;

int availableBytes = Serial.available();
for(int i=0; i<availableBytes; i++)
{
  Serial.println("hi");
  Serial.println(string);
   string[i] = Serial.read();
   myGLCD.print(string, 265, 70);
   string[i+1] = '\0'; // Append a null
} 

why am i not seeing the data from the arduino serial ouput?
  myGLCD.print(string, 265, 70);

This is the line that sends to the LCD whatever arrived from the PC. You need more lines similar to this to display "Hi" or anything else on the LCD.

Your code is missing the setup() function, the loop() function, and any references to libraries.

vaj4088:   myGLCD.print(string, 265, 70);

This is the line that sends to the LCD whatever arrived from the PC. You need more lines similar to this to display "Hi" or anything else on the LCD.

Your code is missing the setup() function, the loop() function, and any references to libraries.

But what should i be doing to send that data FROM the arduino serial TO the LCD? this way i can read it from both the usb and the lcd screen? or should i just be sending the data to the serial and the lcd. sorry im struggling today.

EDIT: my logic is messed up i should probably be just printing to the lcd AND the serial. not sure what i was thinking. unless im still wrong. i basically am trying to mirror all serial activity to the lcd.

  Serial.println(string);
   string[i] = Serial.read();
   myGLCD.print(string, 265, 70);
   string[i+1] = '\0'; // Append a null

You should append the NULL BEFORE you pass the array to a function that expects a string.