• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[AI Script] AI doesn't run

Status
Not open for further replies.
JASS:
globals
    player Karzenoth = Player(0)
    player Fallen = Player(6)
    player Orc = Player(8)
    
    integer PHOENIX = 'hphx'
    integer ELEMENTAL2 = 'hwt2'
    integer ELEMENTAL3 = 'hwt3'
    integer HYDROMANCER = 'nhym'
endglobals
//----------------------------------------------------------//
//------------------------Main Command----------------------//
//----------------------------------------------------------//
function main takes nothing returns nothing
    call CampaignAI(HOUSE, null)
    call SetReplacements(1, 2, 4)
    call GroupTimedLife(true)
    call SetSlowChopping(true)
    set campaign_wood_peons = 2
    
    call SetBuildUnit( 1, PEASANT       )
    call SetBuildUnit( 2, PEASANT       )
    call SetBuildUnit( 1, LUMBER_MILL   )
    call SetBuildUnit( 3, PEASANT       )
    call SetBuildUnit( 1, TOWN_HALL     )
    call SetBuildUnit( 1, KEEP          )
    call SetBuildUnit( 1, HUMAN_ALTAR   )
    call SetBuildUnit( 1, CASTLE        )
    call SetBuildUnit( 1, BLACKSMITH    )
    call SetBuildUnit( 1, ARCANE_VAULT  )
    call SetBuildUnit( 5, SANCTUM       )
    call SetBuildUnit( 8, PEASANT       )
        
    call CampaignDefenderEx(0, 1, 3, PHOENIX)
    call CampaignDefenderEx(3, 1, 0, ELEMENTAL)
    call CampaignDefenderEx(0, 2, 2, ELEMENTAL2)
    call CampaignDefenderEx(0, 1, 3, ELEMENTAL3)
    call CampaignDefenderEx(2, 3, 3, BLOOD_MAGE)
    call CampaignDefenderEx(2, 2, 2, ARCHMAGE)
        
    //Wave 1
    call InitAssaultGroup()
    call CampaignAttackerEx(0, 2, 3, PHOENIX)
    call CampaignAttackerEx(2, 3, 4, ELEMENTAL)
    call CampaignAttackerEx(6, 8, 10, HYDROMANCER)
    call CampaignAttackerEx(1, 2, 3, BLOOD_MAGE)
    call SuicideOnPlayerEx(M10, M7, M7, Karzenoth)
    
    //Wave 2    
    call InitAssaultGroup()
    call CampaignAttackerEx(1, 2, 3, BLOOD_MAGE)
    call CampaignAttackerEx(1, 2, 2, ARCHMAGE)
    call CampaignAttackerEx(6, 8, 10, HYDROMANCER)
    call CampaignAttackerEx(3, 5, 7, PRIEST)
    call CampaignAttackerEx(3, 5, 6, SORCERESS)
    call SuicideOnPlayerEx(M15, M6, M5, Fallen)
    
    //Wave 3
    call InitAssaultGroup()
    call CampaignAttackerEx(2, 3, 3, BLOOD_MAGE)
    call CampaignAttackerEx(0, 1, 2, PHOENIX)
    call CampaignAttackerEx(6, 6, 6, HYDROMANCER)
    call CampaignAttackerEx(0, 1, 2, ARCHMAGE)
    call SuicideOnPlayer(M10, M7, M7, Orc)
    
    //Wave 4
    call InitAssaultGroup()
    call CampaignAttackerEx(4, 6, 8, HYDROMANCER)
    call CampaignAttackerEx(1, 1, 8, ELEMENTAL3)
    call CampaignAttackerEx(2, 4, 3, ELEMENTAL2)
    call CampaignAttackerEx(10, 9, 1, ELEMENTAL)
    call SuicideOnPlayerEx(M15, M15, M6, Karzenoth)
    
    //Wave 5
    call InitAssaultGroup()
    call CampaignAttackerEx(8, 8, 12, ELEMENTAL)
    call CampaignAttackerEx(1, 1, 3, BLOOD_MAGE)
    call CampaignAttackerEx(2, 2, 0, PHOENIX)
    call SuicideOnPlayerEx(M10, M10, M4, Orc)
    
    loop
        //Wave 6+
        call InitAssaultGroup()
        call CampaignAttackerEx(9, 6, 12, PRIEST)
        call CampaignAttackerEx(0, 2, 6, PHOENIX)
        call CampaignAttackerEx(1, 2, 3, BLOOD_MAGE)
        call SuicideOnPlayerEx(M7, M7, M7, Karzenoth)
        
        //Wave 7+
        call InitAssaultGroup()
        call CampaignAttackerEx(9, 12, 14, PRIEST)
        call CampaignAttackerEx(0, 0, 2, PHOENIX)
        call CampaignAttackerEx(2, 3, 3, BLOOD_MAGE)
        call CampaignAttackerEx(2, 2, 2, ARCHMAGE)
        call CampaignAttackerEx(6, 6, 6, SORCERESS)
        call CampaignAttackerEx(3, 5, 8, HYDROMANCER)
        call SuicideOnPlayerEx(M10, M8, M6, Orc)
        
        //Wave 8+
        call InitAssaultGroup()
        call CampaignAttackerEx(9, 12, 15, PRIEST)
        call CampaignAttackerEx(0, 1, 1, PHOENIX)
        call CampaignAttackerEx(2, 2, 3, BLOOD_MAGE)
        call CampaignAttackerEx(2, 2, 2, ARCHMAGE)
        call CampaignAttackerEx(2, 4, 6, SORCERESS)
        call CampaignAttackerEx(5, 7, 8, HYDROMANCER)
        call CampaignAttackerEx(1, 2, 3, ELEMENTAL)
        call CampaignAttackerEx(1, 2, 4, ELEMENTAL2)
        call CampaignAttackerEx(0, 1, 2, ELEMENTAL3)
        call SuicideOnPlayerEx(M10, M9, M9, Fallen)
    endloop
            
endfunction

Note that ELEMENTAL, ELEMENTAL2, ELEMENTAL3, PHOENIX, and HYDROMANCER are all trained in ARCANE_SANCTUM.
Another thing is that ALL BUILDING provides food.

Anybody has any idea why it's failing? Can't spot any error in the code.
 
Status
Not open for further replies.
Top