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.
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.
Test line. Not code. Does it work? Yup. tabbed. Spaced third test line.
Can you share exactly what you are doing?
I suggest that you type in the post, and then click on where it says Preview. It should highlight where the error line is.
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.