When posting code, I get error

begin a line with 4 spaces in a row (or one tab), preceded by a blank line. 4+ spaces or tabs may not be used anywhere else.

Recommended Answers

One method I've had a lot of success with. Start with your IDE. Make sure the code you want to copy is properly formatted. Copy the code. Make sure you have an empty line between where the code will be pasted and the last text you typed. Paste the code. …

Jump to Post

All 10 Replies

Re: Can't post question with code 80 80

You probably have some whitespace somewhere else, that is not a code block. Ensure that the only lines in your message that are indented with spaces or tab are code, and they are preceded and followed by a blank line.

Re: Can't post question with code 80 80
Test line. Not code.  Does it work? Yup.
    tabbed.
  Spaced third test line.

Can you share exactly what you are doing?

Re: Can't post question with code 80 80

I suggest that you type in the post, and then click on where it says Preview. It should highlight where the error line is.

Re: Can't post question with code 80 80

One method I've had a lot of success with. Start with your IDE. Make sure the code you want to copy is properly formatted. Copy the code. Make sure you have an empty line between where the code will be pasted and the last text you typed. Paste the code. If it turns green you're good to go. If not select all the code and hit tab. It should now be green. This indicates that your code is accepted as code.

Re: Can't post question with code 80 80

I generally compose anything of length with MarkDownPad (free) and then copy/paste once I have the formatting correct. It also saves me from having to retype anything in the event of a posting error.

Re: Can't post question with code 80 80

Testing

public static void main(String[] args){
       System.out.print("Testing");
}
Re: Can't post question with code 80 80

Hi All,

Thanks for the reply. I have tested and it works fine.
I will share the screen shot next time if this issue happened again.

Thanks.

Re: Can't post question with code 80 80

If you try to type something and it doesn't go through, hitting the Preview tab should highlight the line that's confusing our Markdown parser.

Re: Can't post question with code 80 80

share the code exactly, then you get answer

commented: I can't post because of the error +0
Re: Can't post question with code 80 80

Can you describe your actions in details?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.