Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

[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!

18 Likes
How do you defeat clash of clones?
How is this code not working? (code needs to be according to the faq. that is still to be done)
[SOLVED] Library Tactician, Need Help!
About the Level Help category
Raiders of the long dark
I solved the problem but i didnt understand the code
Trouble with Freeze tag
[SOLVED] Antipodes help pls😡
I need supprt with "Sleeping on the job" Kithgard Dungeon
Completely blocked on Noble Sacrifice level
[Help] summits gate help[SOLVED]
Steelclaw gap, stuck! really frustrated!
[SOLVED] Summit's Gate help! [Python]
A fine mint Python
Crawl ways of Kithgardrough the level(practice)
[HELP] CS2 leave it to cleaver level 32
Forest Fire Dancing Problem
Please help me with error message in level: "Cloud-rip Commander"{SOLVED}
Forest Fire Dancing Help (JavaScript)
Please help me vital powers(Solved)
Level: Leave It To Cleaver Help (solved)
Help with how to tell If units are hostile in Sarven Desert
[SOLVED] Please help! Summit Gates Error with hero.command()
Web Development 2 | Animania Help
Kelvintaph Burglar Help Needed!
Help on the wizards haunt
Sarven Sum noob
HELP ME plez help
Misty Island Mine Ran Out of Time
Infinite loop please help
Decoy Drill: help
Siege of stokehold won't work
Sarven Treasure 1 help please
Бэквудский лес - Возвращение на ферму Торбуш (Решено)
Welcome to CodeCombat Discourse Forums!
[Adventurer] The One Wizard
Backwood Forest > Siege of Stonehold - help needed
Bank Raid - I need help!
[SOLVED] Why do you need 'if enemy:'?
Пожалуйста помогите с "Караул Сарвена"
Stuck on level Hit and Freeze
Help me with Logical Path
Unknown Uadd operator bug?
Need help On Wishing Well
[SOLVED] Why wont my function work?
Clouddrip Mountain-Timber Guard
Бэквудский лес - "Поручи это рубщику"
I need help on this i am stuck
[SOLVED] I need help with Clash of Clones
Artillerie qui tire sur un allié (Niveau A portée)
Desert Combat (SOLVED)
Alchemic Power(Issue) Need Help
I need help on crossroads
[SOLVED] Return to Thornbush farm help please?
[SOLVED] Help on thunderhooves (python)
[Adventurer] Arrowproof Wolf
Desert combat help : how to increment ordersGiven?
Clash of Clones Help!
Level: Leave it to Cleaver
[SOLVED] Level:borrowed sword help pls
Kithgard brawl problem please
[SOLVED] Timber Guard Python help
[Solved] Help with format of my code on: Challenge: The One Wizard
Https://codecombat.com/play/level/second-gem?
Need help- Game Development Level 2
Zindan adların efendisi yardım
Trying to complete Kithguard dungeon
Помогите пожалуйста, с уровнем Логический путь/ English: Please help with the level of the logical path
Short-sighted Burl level help [Solved]
Python loop attack problem... How do I get it to work?
Help in don´t rush, be quiet
Help with ui.track
Restless dead - 'I can't get there'
Long-range division(python)
Help in don´t rush, be quiet
Help with the level "zig zag and zoom" in the Desert World
Metal Detector - Python
Pet charming problem
Help with "Canyon of Storms"
Hit and freeze HELP
Level: Leave It To Cleaver Help (solved)
Level : Enemy mine
Алмазная дюжина
Dangerous Tracks Help
Chain of Command Help Needed
[SOLVED] Passing Through... Why does ma code nota work?
[SOLVED] Help with "logical path"
Basin Stampede please help
Help with level "distracting dungeon"
This Viking is really lost... -- Need help on level Lost Viking
[SOLVED] Doom Glade Little Code Error
[Solved] Help with Wild horses python
[SOLVED] [Help] logical Path
[Solved] Keeping Time
[Solved] hero.IsPathClear() bug?
Level: Leave it to Cleaver
Munchkin Harvest Level (Dunno how to solve it)
Don't Rush, Be Quiet [Solved]
[Solved] Operation "Killdeer" Help
34. Agrippa Refactored
I don't know what code to use
[SOLVED] Help with Thunderhooves! (javascript)
[RESOLVED] Need help level 12 stage 27 first map
Level: Leave It To Cleaver Help (solved)
Bait and switch (Python)
I need help with Village Warder
Library tactician plz help
[Solved] Clash of clones python
[解决了] 1-18 卡關 求助~~~~~~~~~~~~~
Level: Leave it to Cleaver
[SOLVED] Hit and freeze javascript help
[SOLVED] How to collect items in Salted Earth
When did you start?
[解决了] 1-18 卡關 求助~~~~~~~~~~~~~
I'm stuck on grim determination
Vital Powers Help plz
[SOLVED] Difficulty with Either/Or statements in level Logical Path
[RESOLVED] Need help level 12 stage 27 first map
Need help at the lvl "Long Road" with Python
[SOLVED] Level Ping-pong. Maybe a bug
Bank raid help me!
[SOLVED] If else Problems, Help!
Hi everyone i am having trouble on level 22 crossroads .Please help me
[SOLVED] Two Flowers Python
Stillness in Motion Python
Help with Mad Maxer Strikes Back - Javascript
[SOLVED] Desert: Lurkers (Python)
Golden Mirage : trying to sort out coins (Javascript)
Agony of defeat
[SOLVED] Backwoods Standoff Level Help
[Adventurer] Desert Delta
Python Help on "Fair Battle"
[SOLVED] Library tactician help me
Woodland cleaver how to do
Need help on tiresome GCD
Logical Path Help
[RÈSOLU] Laisse le au Couperet
The Agrippa Defense java script. MAJOR HELP😐
[SOLVED] Help on Clash of Clones
[SOLVED] Am stuck at Siege of Stonehold
Disappearing act
Sarven Shepherd help please Java script
[SOLVED] Computer Science 5: Ring Bearer (python)
[SOLVED] Help Cloudrip Commander Codecombat Python
[SOLVED] Army Training 2, Python
[SOLVED] Help, stuck with mixed unit tactics, in cloudrip mountain
[SOLVED] Help, stuck with mixed unit tactics, in cloudrip mountain
Pet engineer, code doesn't work
[SOLVED] Python code error on Thunderhooves
Level: Ogre Encampment
[ SOLVED ] Bug in "Identification, Please"
Защита крестьянина 2020
I need help with the usual day level
Kelvintaph Burgler, hero dies right away!
How to beat logical path
Help On Backwoods Brawl pt.2
Bombing run help in kelvintaph glacier
[SOLVED] Help with hot gems
[SOLVED] Shine Getter - (Level Help)
Help me with Woodland Cubbies ( and other questions too)
[SOLVED] Pls help me i am kind of stuck at this level : timber guard
[SOLVED] Pls help me i am kind of stuck at this level : timber guard
[SOLVED] Game Development 2: Level 11
[SOLVED] Game Development 2: Level 11
Pls help me i am kind of stuck at this level : i quite don't understand
[SOLVED] Wishing Well
[SOLVED] Level: while ogres were sleeping
Need help on Back to Back
Count Emptiness moveNSteps function problem Solved
Help me with Woodland Cubbies ( and other questions too)
Is holy sword useful?
Not sure why this won't work
Sarven Sheperd help (Python)
Stuck on Mega-Munchkin Attacks
Can I get help for Backwoods Showdown
[SOLVED] Python Blind Distance
Bug in kthgard brawl
So I am having trouble doing the code can I get some help
Level help- Lurkers
[SOLVED] Mad-Maxer gets greedy
[SOLVED] Help Cloudrip Commander Codecombat Python
[SOLVED] Help Cloudrip Commander Codecombat Python
[SOLVED] Library Tactictian HELP! SOS
[SOLVED] Library Tactictian HELP! SOS
The Final Kithmaze help
The Final Kithmaze help
Does anybody know the code to Free Billy on CS2? (PYTHON)
The Final Kithmaze help
[SOLVED] Mixed Unit Tactics NEED HELP
[Level Solved] Stuck on Library Tactician- please help!
"Long-Range Division" is impossible - hostage dies
[SOLVED] Shine Getter Needs 3m^s or more to work
Clash of the Clones Python
[SOLVED] Restless Dead Level Help
Golden Choice Computer Science 6 Javascript help please!
Error in Underground Business 1
[SOLVED] I need help with Clash of Clones
[solved] Distracting Dungeon Help!
[SOLVED] Stranded in the Dunes Codecombat HELP!
Please help me on level 21 the mighty sand yak
[SOLVED] Usual day
Help with Mad Maxer Strikes Back, py
ReferenceError: __pythonRuntime is not defined
[Adventurer] Arrowproof Wolf
[Adventurer] Desert Delta
Im stuck on level 11 game development 2
[SOLVED] I would like some help with Operation 'Killdeer'
I Can't Play Sand Snakes Level
[SOLVED] If else Problems, Help!
Level: Leave it to Cleaver
[SOLVED] Help! Stranded In the Dunes
SleepWalkers [HELP]
Treasured in ice help
[SOLVED] I need help with Friend and Foe can someone help plz?
[SOLVED] Sand Snakes problem
Basin Stampede Help
[SOLVED] Medical-Attention
[Adventurer] Desert Delta
[SOLVED] Doom glade - can't finish level
About level 21 the mighty sand yak
About level 21 the mighty sand yak
[SOLVED] Desert: Lurkers (Python)
[SOLVED] Help on Binary Deployment
Metal Detector - Python
[SOLVED] Pet won't fetch
Help with backwoods fork
Sacred Grove help [Solved]
[SOLVED] Sand Snakes PLEASE HELP
Code Combat Computer Science 4 Level 12: Second Gem
Help! 撿閃亮東西的人-what is the code?
self.findEnemies()
[SOLVED] The two flowers stuck
[SOLVED]Bugs in Operation Killdeer
[SOLVED] Помогите пройти уровень! Букведский лес. Металлодетектор
Stuck on "Sarven Shephard" [SOLVED]
[SOLVED] Operation ´Killdeer´ LvL help ( Python)
CPP Levels Bug Reports
Help with cloudrip brawl 7
[SOLVED] Помогите пройти уровень! Букведский лес. Металлодетектор
[SOLVED] Desert Combat Code is working to half (Python Help)
Bug in level Signs and Portents
[SOLVED] I'm stuck at Backwoods Forest
[SOLVED] Noble Sacrifice level help
[SOLVED] I'm stuck at Backwoods Forest
Level Hit and Freeze is incredibly frustrating
Bug:Computer Science 3(Python) Challenge-Friendly Minefield
Hi everyone i am having trouble on level 22 crossroads .Please help me
Help with brittle morale (python)
[SOLVED] Help on Reindeer Wakeup
Командир клаудрида
Still very confused about what needs to be paid for
[SOLVED] Diamond dozen help (python)
Hit and Freeze Python
The If-Stravaganza level help? (LUA)
Hoarding Gold can't see issue in code
Question on resetting account progress
The Trials - Help me understand my code
[Adventurer] Gardener
Operation "Killdeer"
Не могу пройти Колодец желаний
Chase Them Level Help
[SOLVED] Level help clash of clones
Не могу пройти уровень " Столкновение клонов"
A fine mint Python
CS2 24. Village Warder
Every time i use else in the if/else code my character doesn't do the else
[SOLVED] Sand Snakes Level Problem (Python)
I need help for my google account
[ Решено] [SOLVED] Помогите разобраться в задаче №13 Веб-разработка
Cloudrip mountain library tactician(python only) - I am stuck
Не могу пройти уровень " Столкновение клонов"
Im stuck on level 11 game development 2
[SOLVED]Glitches in game development 2
How do you beat blind distance
Game Grove on Game Development Maze Spawn Error
I Need Help Plase,
I need HELP. In Click Gait In The map Game Development
Kithard Dungeon, Cell Commentary, Time-Limits?
I am stuck in a class
Help I am stuck in Shine Getter
[SOLVED] I need help with clash of clones here is code and armor(python)
Chase Them Level Help
[SOLVED]Struggling with lurkers
Как пройти уровень mixed unit tactics
Java script level run for gold
The Hunt Begins- python
Need help at Freeze Tag
[SOLVED]Underground Business
[SOLVED] Siege of stonehold: hero is not moving
When i run this code my hero will stay in one place and attack dead enemies and will cleave when there is no enimiess
[SOLVED] Backwoods Standoff help! First Post
[Solved] The Bane of Soldiers help (Python)
[SOLVED] Keeping Time Help Needed
[SOLVED] Plz help I can't figure out how to beat it
Hi I am stucked on the game
Need help with "Sarven Siege"
[SOLVED]Help: The Final Kithmaze
I am new. Please help!
Sarven Sentry Help Needed[SOLVED]
[SOLVED] Mixed Unit Tactics NEED HELP
[SOLVED] Need help with "Wild Horses"
[SOLVED] Python Blind Distance
Help on Mages Might!
Dangerous Tracks Help
Python: Hoarding Gold
Help: Woodland Cleaver
[SOLVED] Kithgard Brawl HELP
Can you help me pass the kithgard brawl 6
Sarven gaps help!
I need help on backwoods brawl
Why does this glow script python say, assigning to rvalue (37:4)? (SOLVED)
[Adventurer] Persistence Pays
[SOLVED] Stuck cloudrip commander
DEJA BREW level
I need help on salted earth
Help with Giant's Gate Arena?
Leave it to cleaver,,, pls help
Can’t play Ozaria because don’t have a class code
Who is your best hero?
Village Rover:help if you can
Idea Suggestions Thread
Help me complete this level
CPP Levels Bug Reports
Can we PLEASE get CodeCombat in C# ? Petition maybe?
[HELP] Sleepwalkers Javascript
Prodigy stuff topic
Bye i might not see you for a while
How to fix it? Game Development. Persistance Pays
Code editor hidden
Python Multiplayer Treasure Grove
Help I am stuck in Mountain Mercenaries (Python)
The duck should stop
Code editor not appearing
Hello how has ur day been
Diamond Dozen help - Javascript or any
Is there any way to get more gems?
Hello everyone:)
[SOLVED] I am stuck on operation: killdeer in sarven desert. (python)
Summits gate-infinite loop error
Level: Leave it to Cleaver
Munchkin Harvest Level (Dunno how to solve it)
Sorcerer's blitz need help
Hit and freeze help!
How to do the hit and freeze level
Idea Suggestions Thread
[Solved] Keeping Time
I Need some one to help me fix my giants gate code
Giant Gate Thread
Nitro type chat
[SOLVED] User function not finishing before next methods run
I need help with Leave it to Cleaver
Help Sorcerer Blitz! About thief
Why is my code not working for bank raid?
Tips for Sorcerer's Blitz?
Swift daggers hero.throw() issue
Reset progress. A fresh start
Selling Unwanted Items
Cs3 javascript level 21 help (SOLVED)
Solving the level
Taming.io topic
Decoy Drill JavaScript Help [SOLVED]
Game development levels (SOLVED)
Kelvintaph Crusader I need some help thanks
Chapter 2 level 43 number two
Munchkin-harvest
7lines ping-pong LUA -- is it possible to do 6?
Stick Shift Not Working
How do I find how many enemies are around at a area for fireball in Giant's Gate?
Brown Noise how to kill
[SOLVED] Backwoods Standoff help! First Post
The Prisoner Help? (Python)
[Adventurer] Time To Live
Short-sighted-Burl
I need help with Village Warder
Talk about FOOD and DRINKS!
[Adventurer] Jailbreak
Metal Detector - Python
How do i beat the multiplayer treasure grove in backwoods forest{SOLVED}
Logical Path (Need Help Please)
I am not able to see any x and no knight on game development 1 click gait t
Completely blocked on Noble Sacrifice level
Leave It To The Cleaver PLS HELP PLS

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

2 Likes