• 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.

[Trigger] Script Errors on WE

Status
Not open for further replies.
Level 4
Joined
Mar 13, 2009
Messages
73
i just got a weird error on my map,when i was saving it:

Code:
//===========================================================================
// 
// Just another Warcraft III map
// 
//   Warcraft III map script
//   Generated by the Warcraft III World Editor
//   Date: Tue Mar 24 16:17:53 2009
//   Map Author: Unknown
// 
//===========================================================================

//***************************************************************************
//*
//*  Global Variables
//*
//***************************************************************************

globals
    // Generated
    trigger                 gg_trg_Init                = null
    trigger                 gg_trg_Commands            = null
    trigger                 gg_trg_spawnlist           = null
    trigger                 gg_trg_Rain                = null
    trigger                 gg_trg_Fog                 = null
    trigger                 gg_trg_Zombies             = null
    trigger                 gg_trg_Plague_Bearer       = null
    trigger                 gg_trg_People_Turned_Into_Zombies = null
    trigger                 gg_trg_Giant_Corpse        = null
    trigger                 gg_trg_Ripper              = null
    trigger                 gg_trg_General_Information = null
    trigger                 gg_trg_Credits             = null
    trigger                 gg_trg_This_Time           = null
    string                  gg_snd_DJ_Antoine___Underneath
    string                  gg_snd_Dj_Antoine___This_Time__Klass_Remix_u
    string                  gg_snd_Basshunter___Russian_Privjet
    string                  gg_snd_Basshunter___All_I_Ever_Wanted
    string                  gg_snd_0___Pirates_of_the_Caribbean_2__DJ_Tiesto_remix_u
    string                  gg_snd_David_Guetta___Delirious
    trigger                 gg_trg_Underneath          = null
endglobals

function InitGlobals takes nothing returns nothing
endfunction

//***************************************************************************
//*
//*  Sounds
//*
//***************************************************************************

function InitSounds takes nothing returns nothing
    set gg_snd_DJ_Antoine___Underneath = "war3mapImported\\DJ Antoine - Underneath.mp3"
    set gg_snd_Dj_Antoine___This_Time__Klass_Remix_u = "war3mapImported\\Dj Antoine - This Time (Klass Remix).mp3"
    set gg_snd_Basshunter___Russian_Privjet = "war3mapImported\\Basshunter - Russian Privjet.mp3"
    set gg_snd_Basshunter___All_I_Ever_Wanted = "war3mapImported\\Basshunter - All I Ever Wanted.mp3"
    set gg_snd_0___Pirates_of_the_Caribbean_2__DJ_Tiesto_remix_u = "war3mapImported\\0 - Pirates of the Caribbean 2 (DJ Tiesto remix) .mp3"
    set gg_snd_David_Guetta___Delirious = "war3mapImported\\David Guetta - Delirious.mp3"
endfunction

//***************************************************************************
//*
//*  Unit Creation
//*
//***************************************************************************

//===========================================================================
function CreateBuildingsForPlayer0 takes nothing returns nothing
    local player p = Player(0)
    local unit u
    local integer unitID
    local trigger t
    local real life

    set u = CreateUnit( p, 'h001', -11072,0, 10816,0, 270,000 )
endfunction

//===========================================================================
function CreateUnitsForPlayer0 takes nothing returns nothing
    local player p = Player(0)
    local unit u
    local integer unitID
    local trigger t
    local real life

    set u = CreateUnit( p, 'h000', 310,7, 394,7, 328,710 )
    set u = CreateUnit( p, 'h000', 318,3, 255,0, 198,782 )
    set u = CreateUnit( p, 'h000', 206,2, 119,5, 64,821 )
    set u = CreateUnit( p, 'h000', 126,1, 349,7, 111,460 )
    set u = CreateUnit( p, 'h000', 427,5, 207,8, 187,246 )
    set u = CreateUnit( p, 'h000', 531,2, 128,7, 323,041 )
    set u = CreateUnit( p, 'h000', 516,9, 307,8, 295,541 )
    set u = CreateUnit( p, 'h000', 510,1, 381,9, 50,363 )
    set u = CreateUnit( p, 'h000', 400,3, 448,4, 233,093 )
    set u = CreateUnit( p, 'h000', 404,0, 295,5, 10,679 )
    set u = CreateUnit( p, 'h000', 318,2, 31,2, 278,391 )
    set u = CreateUnit( p, 'h000', 364,0, 96,0, 200,474 )
    set u = CreateUnit( p, 'h000', 285,8, 198,2, 218,766 )
    set u = CreateUnit( p, 'h000', 197,7, 277,1, 149,880 )
    set u = CreateUnit( p, 'h000', 109,4, 285,2, 39,750 )
    set u = CreateUnit( p, 'h000', 68,6, 221,4, 56,724 )
    set u = CreateUnit( p, 'h000', -56,9, 217,5, 237,158 )
    set u = CreateUnit( p, 'h000', 211,8, 446,1, 228,676 )
    set u = CreateUnit( p, 'h000', 126,3, 505,9, 195,321 )
    set u = CreateUnit( p, 'h000', 54,5, 403,8, 352,749 )
    set u = CreateUnit( p, 'h000', -0,8, 316,1, 245,475 )
endfunction

//===========================================================================
function CreateUnitsForPlayer11 takes nothing returns nothing
    local player p = Player(11)
    local unit u
    local integer unitID
    local trigger t
    local real life

    set u = CreateUnit( p, 'n000', 4838,2, 22,2, 141,615 )
    set u = CreateUnit( p, 'n000', 4894,3, 174,3, 151,253 )
    set u = CreateUnit( p, 'n000', 4950,7, 324,1, 161,264 )
    set u = CreateUnit( p, 'n000', 4983,4, 430,7, 168,254 )
    set u = CreateUnit( p, 'n000', 5001,1, 539,8, 175,174 )
    set u = CreateUnit( p, 'n000', 5015,4, 613,3, 179,776 )
    set u = CreateUnit( p, 'n000', 4862,1, 104,1, 146,493 )
    set u = CreateUnit( p, 'n000', 4915,0, 267,1, 157,084 )
    set u = CreateUnit( p, 'n001', 4751,9, 65,0, 140,287 )
    set u = CreateUnit( p, 'n001', 4772,4, 128,6, 144,514 )
    set u = CreateUnit( p, 'n001', 4806,6, 213,4, 150,702 )
    set u = CreateUnit( p, 'n001', 4835,3, 323,7, 158,590 )
    set u = CreateUnit( p, 'n001', 4865,5, 385,1, 163,410 )
    set u = CreateUnit( p, 'n001', 4888,5, 446,9, 168,015 )
    set u = CreateUnit( p, 'n001', 4909,6, 522,0, 173,412 )
    set u = CreateUnit( p, 'n001', 4927,0, 582,4, 177,644 )
    set u = CreateUnit( p, 'n001', 4943,0, 645,2, 181,889 )
    set u = CreateUnit( p, 'u000', 4780,8, 674,4, 184,733 )
    set u = CreateUnit( p, 'u000', 4676,3, 405,4, 160,243 )
    set u = CreateUnit( p, 'u000', 4584,3, 169,2, 137,981 )
    set u = CreateUnit( p, 'u001', 4421,0, 149,1, 125,494 )
    set u = CreateUnit( p, 'u001', 4440,5, 212,8, 131,143 )
    set u = CreateUnit( p, 'u001', 4439,2, 285,8, 136,735 )
    set u = CreateUnit( p, 'u001', 4459,3, 355,8, 144,921 )
    set u = CreateUnit( p, 'u001', 4478,0, 433,2, 154,809 )
    set u = CreateUnit( p, 'n001', 5093,8, 583,6, 178,104 )
    set u = CreateUnit( p, 'n001', 5072,0, 517,2, 174,213 )
    set u = CreateUnit( p, 'n001', 5050,7, 399,9, 167,303 )
    set u = CreateUnit( p, 'n001', 5009,2, 278,1, 159,818 )
    set u = CreateUnit( p, 'n001', 4974,6, 219,1, 155,845 )
    set u = CreateUnit( p, 'n001', 4956,0, 134,8, 150,966 )
    set u = CreateUnit( p, 'n001', 4923,6, 67,8, 146,703 )
    set u = CreateUnit( p, 'n001', 4895,0, -12,8, 142,053 )
    set u = CreateUnit( p, 'u001', 4504,6, 503,5, 164,791 )
    set u = CreateUnit( p, 'u001', 4529,4, 566,1, 173,434 )
    set u = CreateUnit( p, 'u001', 4543,9, 632,9, 182,002 )
    set u = CreateUnit( p, 'u001', 4609,6, 698,6, 188,890 )
    set u = CreateUnit( p, 'u001', 4641,3, 760,1, 194,488 )
    set u = CreateUnit( p, 'u000', 4682,2, 572,0, 104,747 )
    set u = CreateUnit( p, 'u000', 4618,6, 287,8, 54,823 )
endfunction

//===========================================================================
function CreatePlayerBuildings takes nothing returns nothing
    call CreateBuildingsForPlayer0(  )
endfunction

//===========================================================================
function CreatePlayerUnits takes nothing returns nothing
    call CreateUnitsForPlayer0(  )
    call CreateUnitsForPlayer11(  )
endfunction

//===========================================================================
function CreateAllUnits takes nothing returns nothing
    call CreatePlayerBuildings(  )
    call CreatePlayerUnits(  )
endfunction

//***************************************************************************
//*
//*  Triggers
//*
//***************************************************************************

//===========================================================================
// Trigger: Init
//
// Default melee game initialization for all players
//===========================================================================
function Trig_Init_Actions takes nothing returns nothing
    call SetTimeOfDayScalePercentBJ( 25.00 )
endfunction

//===========================================================================
function InitTrig_Init takes nothing returns nothing
    set gg_trg_Init = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Init, function Trig_Init_Actions )
endfunction

//===========================================================================
// Trigger: Commands
//===========================================================================
function Trig_Commands_Actions takes nothing returns nothing
    call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_ALWAYSHINT, "TRIGSTR_011" )
    call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_012", "TRIGSTR_013", "ReplaceableTextures\\CommandButtons\\BTNAmbush.blp" )
endfunction

//===========================================================================
function InitTrig_Commands takes nothing returns nothing
    set gg_trg_Commands = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Commands, function Trig_Commands_Actions )
endfunction

//===========================================================================
// Trigger: spawnlist
//===========================================================================
function Trig_spawnlist_Actions takes nothing returns nothing
    call DisplayTimedTextToForce( GetPlayersAll(), 30.00, "TRIGSTR_014" )
endfunction

//===========================================================================
function InitTrig_spawnlist takes nothing returns nothing
    set gg_trg_spawnlist = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_spawnlist, Player(0), "-spawnlist", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_spawnlist, Player(1), "-spawnlist", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_spawnlist, Player(2), "-spawnlist", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_spawnlist, Player(3), "-spawnlist", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_spawnlist, Player(4), "-spawnlist", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_spawnlist, Player(5), "-spawnlist", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_spawnlist, Player(6), "-spawnlist", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_spawnlist, Player(7), "-spawnlist", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_spawnlist, Player(8), "-spawnlist", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_spawnlist, Player(9), "-spawnlist", true )
    call TriggerAddAction( gg_trg_spawnlist, function Trig_spawnlist_Actions )
endfunction

//===========================================================================
// Trigger: Rain
//===========================================================================
function Trig_Rain_Actions takes nothing returns nothing
    call AddWeatherEffectSaveLast( GetPlayableMapRect(), 'RAhr' )
    call DisplayTimedTextToForce( GetPlayersAll(), 5.00, "TRIGSTR_016" )
    call TriggerSleepAction( 5.00 )
    call EnableWeatherEffect( GetLastCreatedWeatherEffect(), true )
    call TriggerSleepAction( 180.00 )
    call EnableWeatherEffect( GetLastCreatedWeatherEffect(), false )
    call RemoveWeatherEffectBJ( GetLastCreatedWeatherEffect() )
    call AddWeatherEffectSaveLast( GetPlayableMapRect(), 'LRaa' )
    call EnableWeatherEffect( GetLastCreatedWeatherEffect(), true )
    call TriggerSleepAction( 60.00 )
    call EnableWeatherEffect( GetLastCreatedWeatherEffect(), false )
    call RemoveWeatherEffectBJ( GetLastCreatedWeatherEffect() )
endfunction

//===========================================================================
function InitTrig_Rain takes nothing returns nothing
    set gg_trg_Rain = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Rain, 300.00 )
    call TriggerAddAction( gg_trg_Rain, function Trig_Rain_Actions )
endfunction

//===========================================================================
// Trigger: Fog
//===========================================================================
function Trig_Fog_Actions takes nothing returns nothing
    call DisplayTimedTextToForce( GetPlayersAll(), 5.00, "TRIGSTR_015" )
    call TriggerSleepAction( 5.00 )
    call AddWeatherEffectSaveLast( GetPlayableMapRect(), 'FDwh' )
    call EnableWeatherEffect( GetLastCreatedWeatherEffect(), true )
    call TriggerSleepAction( 200.00 )
    call EnableWeatherEffect( GetLastCreatedWeatherEffect(), false )
    call RemoveWeatherEffectBJ( GetLastCreatedWeatherEffect() )
endfunction

//===========================================================================
function InitTrig_Fog takes nothing returns nothing
    set gg_trg_Fog = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Fog, 120.00 )
    call TriggerAddAction( gg_trg_Fog, function Trig_Fog_Actions )
endfunction

//===========================================================================
// Trigger: Zombies
//===========================================================================
function Trig_Zombies_Actions takes nothing returns nothing
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = 15
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        call CreateNUnitsAtLoc( 1, 'n000', Player(11), GetRandomLocInRect(GetPlayableMapRect()), 270.00 )
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
endfunction

//===========================================================================
function InitTrig_Zombies takes nothing returns nothing
    set gg_trg_Zombies = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Zombies, 150.00 )
    call TriggerAddAction( gg_trg_Zombies, function Trig_Zombies_Actions )
endfunction

//===========================================================================
// Trigger: Plague Bearer
//===========================================================================
function Trig_Plague_Bearer_Actions takes nothing returns nothing
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = 8
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        call CreateNUnitsAtLoc( 1, 'n001', Player(11), GetRandomLocInRect(GetPlayableMapRect()), 270.00 )
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
endfunction

//===========================================================================
function InitTrig_Plague_Bearer takes nothing returns nothing
    set gg_trg_Plague_Bearer = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Plague_Bearer, 300.00 )
    call TriggerAddAction( gg_trg_Plague_Bearer, function Trig_Plague_Bearer_Actions )
endfunction

//===========================================================================
// Trigger: People Turned Into Zombies
//===========================================================================
function Trig_People_Turned_Into_Zombies_Actions takes nothing returns nothing
    call TriggerSleepAction( 4.00 )
    call CreateNUnitsAtLoc( 1, 'n000', Player(11), GetUnitLoc(GetDyingUnit()), 270.00 )
endfunction

//===========================================================================
function InitTrig_People_Turned_Into_Zombies takes nothing returns nothing
    set gg_trg_People_Turned_Into_Zombies = CreateTrigger(  )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_People_Turned_Into_Zombies, Player(0), EVENT_PLAYER_UNIT_DEATH )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_People_Turned_Into_Zombies, Player(1), EVENT_PLAYER_UNIT_DEATH )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_People_Turned_Into_Zombies, Player(2), EVENT_PLAYER_UNIT_DEATH )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_People_Turned_Into_Zombies, Player(3), EVENT_PLAYER_UNIT_DEATH )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_People_Turned_Into_Zombies, Player(4), EVENT_PLAYER_UNIT_DEATH )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_People_Turned_Into_Zombies, Player(5), EVENT_PLAYER_UNIT_DEATH )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_People_Turned_Into_Zombies, Player(6), EVENT_PLAYER_UNIT_DEATH )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_People_Turned_Into_Zombies, Player(7), EVENT_PLAYER_UNIT_DEATH )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_People_Turned_Into_Zombies, Player(8), EVENT_PLAYER_UNIT_DEATH )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_People_Turned_Into_Zombies, Player(9), EVENT_PLAYER_UNIT_DEATH )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_People_Turned_Into_Zombies, Player(10), EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddAction( gg_trg_People_Turned_Into_Zombies, function Trig_People_Turned_Into_Zombies_Actions )
endfunction

//===========================================================================
// Trigger: Giant Corpse
//===========================================================================
function Trig_Giant_Corpse_Actions takes nothing returns nothing
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = 5
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        call CreateNUnitsAtLoc( 1, 'u000', Player(11), GetRandomLocInRect(GetPlayableMapRect()), 270.00 )
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
endfunction

//===========================================================================
function InitTrig_Giant_Corpse takes nothing returns nothing
    set gg_trg_Giant_Corpse = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Giant_Corpse, 480.00 )
    call TriggerAddAction( gg_trg_Giant_Corpse, function Trig_Giant_Corpse_Actions )
endfunction

//===========================================================================
// Trigger: Ripper
//===========================================================================
function Trig_Ripper_Actions takes nothing returns nothing
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = 15
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        call CreateNUnitsAtLoc( 1, 'u001', Player(11), GetRandomLocInRect(GetPlayableMapRect()), 270.00 )
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
endfunction

//===========================================================================
function InitTrig_Ripper takes nothing returns nothing
    set gg_trg_Ripper = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Ripper, 660.00 )
    call TriggerAddAction( gg_trg_Ripper, function Trig_Ripper_Actions )
endfunction

//===========================================================================
// Trigger: General Information
//===========================================================================
function Trig_General_Information_Actions takes nothing returns nothing
    call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_020", "TRIGSTR_021", "ReplaceableTextures\\CommandButtons\\BTNAmbush.blp" )
endfunction

//===========================================================================
function InitTrig_General_Information takes nothing returns nothing
    set gg_trg_General_Information = CreateTrigger(  )
    call TriggerAddAction( gg_trg_General_Information, function Trig_General_Information_Actions )
endfunction

//===========================================================================
// Trigger: Credits
//===========================================================================
function Trig_Credits_Actions takes nothing returns nothing
    call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_022", "TRIGSTR_023", "ReplaceableTextures\\CommandButtons\\BTNAmbush.blp" )
endfunction

//===========================================================================
function InitTrig_Credits takes nothing returns nothing
    set gg_trg_Credits = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Credits, function Trig_Credits_Actions )
endfunction

//===========================================================================
// Trigger: This Time
//===========================================================================
function Trig_This_Time_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A003' ) ) then
        return false
    endif
    return true
endfunction

function Trig_This_Time_Actions takes nothing returns nothing
    call PlayMusicBJ( gg_snd_Dj_Antoine___This_Time__Klass_Remix_u )
endfunction

//===========================================================================
function InitTrig_This_Time takes nothing returns nothing
    set gg_trg_This_Time = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_This_Time, EVENT_PLAYER_UNIT_SPELL_CAST )
    call TriggerAddCondition( gg_trg_This_Time, Condition( function Trig_This_Time_Conditions ) )
    call TriggerAddAction( gg_trg_This_Time, function Trig_This_Time_Actions )
endfunction

//===========================================================================
// Trigger: Underneath
//===========================================================================
function Trig_Underneath_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A002' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Underneath_Actions takes nothing returns nothing
    call PlayMusicBJ( gg_snd_DJ_Antoine___Underneath )
endfunction

//===========================================================================
function InitTrig_Underneath takes nothing returns nothing
    set gg_trg_Underneath = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Underneath, EVENT_PLAYER_UNIT_SPELL_CAST )
    call TriggerAddCondition( gg_trg_Underneath, Condition( function Trig_Underneath_Conditions ) )
    call TriggerAddAction( gg_trg_Underneath, function Trig_Underneath_Actions )
endfunction

//===========================================================================
function InitCustomTriggers takes nothing returns nothing
    call InitTrig_Init(  )
    call InitTrig_Commands(  )
    call InitTrig_spawnlist(  )
    call InitTrig_Rain(  )
    call InitTrig_Fog(  )
    call InitTrig_Zombies(  )
    call InitTrig_Plague_Bearer(  )
    call InitTrig_People_Turned_Into_Zombies(  )
    call InitTrig_Giant_Corpse(  )
    call InitTrig_Ripper(  )
    call InitTrig_General_Information(  )
    call InitTrig_Credits(  )
    call InitTrig_This_Time(  )
    call InitTrig_Underneath(  )
endfunction

//===========================================================================
function RunInitializationTriggers takes nothing returns nothing
    call ConditionalTriggerExecute( gg_trg_Init )
    call ConditionalTriggerExecute( gg_trg_Commands )
    call ConditionalTriggerExecute( gg_trg_General_Information )
    call ConditionalTriggerExecute( gg_trg_Credits )
endfunction

//***************************************************************************
//*
//*  Players
//*
//***************************************************************************

function InitCustomPlayerSlots takes nothing returns nothing

    // Player 0
    call SetPlayerStartLocation( Player(0), 0 )
    call SetPlayerColor( Player(0), ConvertPlayerColor(0) )
    call SetPlayerRacePreference( Player(0), RACE_PREF_HUMAN )
    call SetPlayerRaceSelectable( Player(0), true )
    call SetPlayerController( Player(0), MAP_CONTROL_USER )

endfunction

function InitCustomTeams takes nothing returns nothing
    // Force: TRIGSTR_002
    call SetPlayerTeam( Player(0), 0 )

endfunction

//***************************************************************************
//*
//*  Main Initialization
//*
//***************************************************************************

//===========================================================================
function main takes nothing returns nothing
    call SetCameraBounds( -11520,0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -11776,0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 11520,0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 11264,0 - GetCameraMargin(CAMERA_MARGIN_TOP), -11520,0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 11264,0 - GetCameraMargin(CAMERA_MARGIN_TOP), 11520,0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -11776,0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) )
    call SetDayNightModels( "Environment\\DNC\\DNCDalaran\\DNCDalaranTerrain\\DNCDalaranTerrain.mdl", "Environment\\DNC\\DNCDalaran\\DNCDalaranUnit\\DNCDalaranUnit.mdl" )
    call NewSoundEnvironment( "Default" )
    call SetAmbientDaySound( "DalaranRuinsDay" )
    call SetAmbientNightSound( "DalaranRuinsNight" )
    call SetMapMusic( "Music", true, 0 )
    call InitSounds(  )
    call CreateAllUnits(  )
    call InitBlizzard(  )
    call InitGlobals(  )
    call InitCustomTriggers(  )
    call RunInitializationTriggers(  )

endfunction

//***************************************************************************
//*
//*  Map Configuration
//*
//***************************************************************************

function config takes nothing returns nothing
    call SetMapName( "Just another Warcraft III map" )
    call SetMapDescription( "Nondescript" )
    call SetPlayers( 1 )
    call SetTeams( 1 )
    call SetGamePlacement( MAP_PLACEMENT_USE_MAP_SETTINGS )

    call DefineStartLocation( 0, 5696,0, 1024,0 )

    // Player setup
    call InitCustomPlayerSlots(  )
    call SetPlayerSlotAvailable( Player(0), MAP_CONTROL_USER )
    call InitGenericPlayerSlots(  )
endfunction

do any1 know what that means?
well,before that happened i was trying to make my map a "Dj System" so that the host could choose the musics to play,there would be some buildings on the left-top corner of the map where the player 1 (red) could play the musics by using each building's skills,here's the triggers:

  • This Time
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Dj Antoine - This Time
    • Actions
      • Sound - Play Dj_Antoine___This_Time__Klass_Remix_u <gen>
  • Underneath
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Dj Antoine - Underneath
    • Actions
      • Sound - Play DJ_Antoine___Underneath <gen>
does anyone know how to solve this??

P.S.: my map doesn't open on WC3 even when i want to test it
 
Level 4
Joined
Mar 13, 2009
Messages
73
i don't think mine's french O_O and no,im not using any modified editor or files,and also,this strange error seems to just have solved by its own,don't know why,when i tried to load my map now,i didn't see any errors...this is rly weird... O_O like Marcelo said "Some random errors appear sometimes." but well,guess this error is done for xD well thank for the suggestions every1 anyway
 
Status
Not open for further replies.
Top