My code is not working HELP

this is my code it is just a test but it look fine to me but the functions i made are not working

def megapoints():
    if hero.isReady("boost") and hero.isReady("hot") and hero.isReady("goliath"):
        if hero.findTheirPlayers(0) <= 3:
            canQuick0 = 0
            hero.summon("big", 0) 
            hero.summon("big", 0)  
            hero.summon("big", 0)  
            hero.summon("sniper", 0)
            hero.summon("sniper", 0)
            hero.summon("sniper", 0)
            hero.play("boost", 0)
            hero.play("hot", 0)
            hero.play("goliath", 0)
        if hero.findTheirPlayers(1) <= 3:
            canQuick1 = 0
            hero.summon("big", 1) 
            hero.summon("big", 1)  
            hero.summon("big", 1)  
            hero.summon("sniper", 1)
            hero.summon("sniper", 1)
            hero.summon("sniper", 1)
            hero.play("boost", 1)
            hero.play("hot", 1)
            hero.play("goliath", 1)
        if hero.findTheirPlayers(2) <= 3:
            canQuick2 = 0
            hero.summon("big", 2) 
            hero.summon("big", 2)  
            hero.summon("big", 2)  
            hero.summon("sniper", 2)
            hero.summon("sniper", 2)
            hero.summon("sniper", 2)
            hero.play("boost", 2)
            hero.play("hot", 2)
            hero.play("goliath", 2)
    else:
        pass
     

def quicksand():
    if hero.isReady("quicksand"):
        if hero.findTheirPlayers(0) >= 4 and canQuick0 == 1:
            hero.play("quicksand", 0)
        if hero.findTheirPlayers(1) >= 4 and canQuick1 == 2:
            hero.play("quicksand", 1)
        if hero.findTheirPlayers(2) >= 4 and canQuick2 == 1:
            hero.play("quicksand", 2)
    else:
        pass
while True:
    quicksand()
    megapoints()



1 Like

else: pass may have something to do with it …

1 Like

here is my new code it is still not working

def megapoints():
    if hero.isReady("boost") and hero.isReady("hot") and hero.isReady("goliath"):
        if hero.findTheirPlayers(0) <= 3:
            canQuick0 = 0
            hero.summon("big", 0) 
            hero.summon("big", 0)  
            hero.summon("big", 0)  
            hero.summon("sniper", 0)
            hero.summon("sniper", 0)
            hero.summon("sniper", 0)
            hero.play("boost", 0)
            hero.play("hot", 0)
            hero.play("goliath", 0)
        else:
            canQuick0 = 1
        if hero.findTheirPlayers(1) <= 3:
            canQuick1 = 0
            hero.summon("big", 1) 
            hero.summon("big", 1)  
            hero.summon("big", 1)  
            hero.summon("sniper", 1)
            hero.summon("sniper", 1)
            hero.summon("sniper", 1)
            hero.play("boost", 1)
            hero.play("hot", 1)
            hero.play("goliath", 1)
        else:
            canQuick1 = 1
        if hero.findTheirPlayers(2) <= 3:
            canQuick2 = 0
            hero.summon("big", 2) 
            hero.summon("big", 2)  
            hero.summon("big", 2)  
            hero.summon("sniper", 2)
            hero.summon("sniper", 2)
            hero.summon("sniper", 2)
            hero.play("boost", 2)
            hero.play("hot", 2)
            hero.play("goliath", 2)
        else:
            canQuick2 = 1
     

def quicksand():
    if hero.isReady("quicksand"):
        if hero.findTheirPlayers(0) >= 4 and canQuick0 == 1:
            hero.play("quicksand", 0)
        if hero.findTheirPlayers(1) >= 4 and canQuick1 == 2:
            hero.play("quicksand", 1)
        if hero.findTheirPlayers(2) >= 4 and canQuick2 == 1:
            hero.play("quicksand", 2)

while True:
    quicksand()
    megapoints()
1 Like