[Essentials] How To Post/Format Your Code Correctly

Formatting your code before posting code is essential to our community, and if you don’t we might not be able to help :frowning: Everyone must know how to format ALL of your code properly. It’s really easy and only requires a very small amount of effort.

To post your code from the game , use the </> button or it won’t format properly. When you click the </> button, the following will appear:


Please paste ALL of your code inside the triple back tick marks.

``` <— Triple back tick marks.

Paste ALL of your code in here.

``` <— Triple back tick marks.

https://giphy.com/gifs/2sXfPjntOptS5B9TJa/html5

There are many people here willing and able to help. If you use the </> button correctly, then ALL of your code should look like this:

while True:
    enemy = hero.findNearestEnemy()
    if enemy:
        hero.attack(enemy)
    else:
        hero.say("My code is formatted properly. Neat!")

But if it’s not, it looks like this:

while True:
enemy = hero.findNearestEnemy()
if enemy:
hero.attack(enemy)
else:
hero.say("My code is not formatted properly ☹")

If ALL of your code isn’t formatted like the code above, then you’re doing it wrong and we can’t see the structure of the code to troubleshoot whether or not that is the issue, and since we dont know where is indented, we’ll never know how to fix your code. Unless you format your code! Use the </> button and help us help you. This works when sending a private message as well(Unlocked at trust level basic, for more information about trust levels, go here). And don’t hesitate to ask us for your help! You can also find answers and talk to the AWESOME staff and ask for help here!
Guide made by @Chaboi_3000 and @MunkeyShynes
Thank you for taking your time to read this. And feel free to ask us any questions! And most importantly, enjoy your time in this forum!

24 Likes

Making it a wiki so people can help update the missing images. :slight_smile: (Thank you @ZAX155)

4 Likes