Hunters and Prey serious bug

<img

Great! :smile:
Looks like you are using Windows 7. Your clock says “3:44 PM 3/13/2016”, it is at the bottom-right of your screen. It seems your clock is okay, so it is not the problem.

Can you take a screenshot of the game screen that tells you to wait a month to submit as well?

Perfect! :smiley:

So it is really a bug in the game. I’ve reported it in CodeCombat’s issue tracker, so the developers should see it soon.

They may also need to know your CodeCombat username to look up your account data and fix this problem.

how do i give my username

I think the name or email that shows up in your settings page should be enough for the CodeCombat team to identify your account.

Where is the settings place

Click the link (blue text) in my previous message.

whwre

The email is enough, I think. :smiley:

The bug does not apply to my account on codecombat and instead it says that I can submit in a day.

Just saw this–sorry about the delay. I fixed the submission time for your account for that level, so you can submit again now. It had been set to 17 days from now for some reason–maybe the system clock was wrong at a time in the past?

Hey @Thelightside could you please send me the code for Hunters and Prey? I’m so tired of trying to figure it out!

This person last posted 2 years ago. Don’t even bother.

Also, don’t revive dead topics for no reason.

Also, what’s the point of getting the solution to the level? You wouldn’t learn what it is supposed to teach.

-SuperSmacker

1 Like

You are responding to someone who hasn’t been seen on this board for over two years. Also, we do not provide solutions on this board. If you post your code we will be happy to help you with it, but there is no point in solving the level without learning how because you will simply get stuck on the next level. There are no rules against reviving dead threads as long as the post is relevant, however simply asking for the finished code is not a valid reason. It would be best to start a new thread and post the code you have so far so that we can help you with it. Be sure to use the </> button so we can see the formatting.

Oh okay, I didn’t realize that, but thanks for letting me know!

Also, this is what i have so far for my code::

// Ogres are trying to take out your reindeer!
// Keep your archers back while summoning soldiers to attack.

hero.pickUpCoin = function() {
// Collect coins.
coin = self.findNearest(self.findItems())
if coin {
self.move(coin.pos
}

hero.summonTroops = function() {
// Summon soldiers if you have the gold.
if self.gold > self.costOf(“soldier”)
self.summon(“soldier”)
}

// This function has an argument named soldier.
// Arguments are like variables.
// The value of an argument is determined when the function is called.
hero.commandSoldier = function(soldier) {
// Soldiers should attack enemies.
enemy = soldier.findNearestEnemy
if enemy {
hero.command(soldier, “attack”, enemy)
}

// Write a commandArcher function to tell your archers what to do!
// It should take one argument that will represent the archer passed to the function when it’s called.
// Archers should only attack enemies who are closer than 25 meters, otherwise, stay still.

while(true) {
hero.pickUpCoin();
hero.summonTroops();
var friends = hero.findFriends();
for(var i=0; i < friends.length; i++) {
var friend = friends[i];
if(friend.type == “soldier”) {
// This friend will be assigned to the variable soldier in commandSoldier
hero.commandSoldier(friend);
} else if (friend.type == “archer”) {
// Be sure to command your archers.
enemy = archer.findNearest(archer.findenemies)
if enemy and archer.distanceto(enemy) < 25:
hero.command(archer, “attack”, enemy)
else:
hero.command(archer, “move”, archer.pos)
}
}
}

Use this, </> to format ur code, we can’t see what the code is unless you use </> to format the code.

Please learn to post your code properly. It just requires a 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.

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")

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. Use the </> button and help us help you. This works when sending a private message as well.

Thank you.

2 Likes

MuchLove

Would definitely spam that button if I could like the post multiple times