help me i cant get past sarvian seige
do you have subscription? if so, what hero are you trying to use? could you send a photo of your gear?
hm ok i i will show u the code and armor im using
please note that if your code works, it is against the codeCombat discourse rules.
loop
flag = findFlag()
marks = [
{
x: 84
y: 78
}
{
x: 84
y: 51
}
{
x: 83
y: 22
}
]
if @gold >= 20
mark = @findNearest(marks)
@moveXY mark.x, mark.y
if flag
@pickUpFlag flag
coin = @findNearest(@findItems())
@moveXY coin.pos.x, coin.pos.y
please format your code correctly by clicking the </> symbol. it makes your code easier to read.
thanks for helping me
``loop
flag = findFlag()
marks = [
{
x: 84
y: 78
}
{
x: 84
y: 51
}
{
x: 83
y: 22
}
]
if @gold >= 20
mark = @findNearest(marks)
@moveXY mark.x, mark.y
if flag
@pickUpFlag flag
coin = @findNearest(@findItems())
@moveXY coin.pos.x, coin.pos.y
you might have accidentaly deleted a quote
loop
flag = findFlag()
marks = [
{
x: 84
y: 78
}
{
x: 84
y: 51
}
{
x: 83
y: 22
}
]
if @gold >= 20
mark = @findNearest(marks)
@moveXY mark.x, mark.y
if flag
@pickUpFlag flag
coin = @findNearest(@findItems())
@moveXY coin.pos.x, coin.pos.y
are you trying to do this in python or javascript?
i am trying to do this in python
hmm, I don’t think @gold, @pickUpFlag or @findNearest are functions. try hero.gold, hero.pickUpFlag(), etc.
ok thanks i will try that
also, another thing that you may have trouble with is the fact that you are under attack without defending yourself.
ok thanks man for help
but it say their is a problem with my code
Try restarting and writing your own code, loop doesn’t work in Python and Python doesn’t need that much brackets. @ never works in Python
Lydia
that is coffee script
He is trying to do it in Python.
Lydia
also, this level is a replayable level like the kithgard brawl, so you do not need to beat it.