Um why? (Get tower Issue)

So I’m trying to use a list to set the order of towers I upgrade however im experiencing this issue any idea to fix

def upgrade():
    if hero.mana > (towerLV*10)+hero.time:,point)
        if tick >= 7:
            tick = 0
            tick += 1

More specifically the thing gives me the error that the input must be a letter

what arena is this?

Frozen Fortress the tower defence

k, while I try to find the issue, maybe you could try using my code snippet from tips and tricks?

also btw why the +hero.time

Um that would require me to manually do this snippet for each individual tower
not to mention the editor breaks when the argument is anything but a string

wait no this is a different arena one sec

well in my head it was to limit the mana spending as the fight went on

wait it’s the same arena I’m confusedd

why? also lets go to pms

??? sorry im new to this forum

k, also, here, new code:

def upgrade(t):
    if hero.mana > towerLV * 10 + hero.time:,point)
        if t >= 7:
            return 0
            return t + 1
while True:
    tick = upgrade(tick)

python is a bit weird with variables so I needed to add an argument to the function instead of using tick directly, and now instead of modifying it in the function (which doesn’t actually modify it btw), you modify it outside by tick = upgrade(tick), so whenever you need to call the function you must do tick = upgrade(tick) unless you want tick to be unchanged