Error setting up serial communication

I am trying to setup basic communication between two arduinos. Im just getting started as far as understanding serial connections, when trying to setup one arduino to read, i get the error message posted in the picture, not sure what im missing, seems like everything should be in order?

Any advice on the topic beyond the scope of my error are also appreciated at this point.

I am using the second arduino as a menu system for the first one, (so that it doesnt interrupt the program flow until i send an interrupt signal and instructions.)

Too much trouble to use the "copy error messages" control, huh?

why is it i always get nothing but snark when i ask for help here?

seriously.

do you need the entire error so that you may assist my issue or did you really just reply to snark at my misgiving?

Start here

Why can't you post code and error messages according to the forum guidelines.

Read the forum guidelines to see how to properly post code.

Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

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.

you assume ive read the forum guidlines for posting.

i provided all the information i felt was reasonably necessary to provide a solution to the problem, in an easy to read manner. I fail to see where there is even a problem at all, tbh.

I guess im gonna need more coffee to deal with this am.

Here is the syntax for the readBytes() function:

Syntax

Serial.readBytes(buffer, length)

Parameters

Serial: serial port object. See the list of available serial ports for each board on the Serial main page.
buffer: the buffer to store the bytes in. Allowed data types: array of char or byte.
length: the number of bytes to read. Allowed data types: int.

The recieve variable is not array.

Better ways (non blocking) to read from the serial port are covered in the serial input basics tutorial.

OP are you using a Arduino Uno? If so you might want to look up why you'll want to use softwareserial for the thing.

If the OP had posted the code in code tags, I'd not be wating my time trying to figure out the what is not.

I've looked at your posting history, and confess I can't really see any, but your definition of "snark" may be different to mine. (It's part of the title of a poem by Lewis Carroll, AFAIK)

Well, yes.
Duh.

excellent, i need an array, thank you for the direction.

okay, im off to project land again, but, actually, the picture identifies the unit as a mega2560.

We know you didn’t read the forum guidelines nor do you have any intention to follow forum rules to gain the free information offered here.

look, okay, i give... obviously you guys are just as miserable as i am. it shows.

a side of snark and guilt with my coffee and already frustrated mind due to having project errors is an excellent addition to any day.

No, you need a pointer.

Where does it say, in any internet forum, questioners need only supply minimal information and use the format of their choosing when asking questions.

If this was the case, 10,000 new users would have 10,000 different ways of requesting help.

With standardization volunteers have a reasonable chance of helping the visitor.

It also shows the 'copy error message' control

Google:

C++ pointer

If you had read the guidelines and presented your problem in accordance with the guidelines you would have gotten your answer in reply 2 or 3 instead of 7. Efficient?

That happens a lot here.
:pleading_face:

Would the OP, please, post your code in code tags?