| 12-03-2004, 05:56 PM | #1 |
I was just making my campaign, and saved and got compile errors! I dont understand why, please view the script. I have only make one trigger and that one have always work so I dont think its the trigger. The trigger is Init Events Time - Elapsed game time is 0,10 seconds Conditions Actions Destructible - Open Gate (Horizontal) 0949 <gen> but ok here you get the script and an example error marked with *'s. Also now all dot something is , something, like "Elapsed game time is 0,10 seconds" Code:
//===========================================================================
//
// The Beginning
//
// Warcraft III map script
// Generated by the Warcraft III World Editor
// Date: Fri Dec 03 18:49:30 2004
// Map Author: Arkidas
//
//===========================================================================
//***************************************************************************
//*
//* Global Variables
//*
//***************************************************************************
globals
// Generated
trigger gg_trg_Init = null
destructable gg_dest_B006_0949 = null
endglobals
function InitGlobals takes nothing returns nothing
endfunction
//***************************************************************************
//*
//* Destructable Objects
//*
//***************************************************************************
function CreateAllDestructables takes nothing returns nothing
local destructable d
local trigger t
local real life
*set gg_dest_B006_0949 = CreateDestructableZ( 'B006', -11008,0, 7232,0, 32,6, 180,000, 2,200, 0 )*
endfunction
//***************************************************************************
//*
//* Unit Creation
//*
//***************************************************************************
//===========================================================================
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, 'h003', -10862,0, 7064,1, 54,527 )
endfunction
//===========================================================================
function CreateNeutralPassive takes nothing returns nothing
local player p = Player(PLAYER_NEUTRAL_PASSIVE)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'nfro', -14073,4, 12075,5, 131,664 )
set u = CreateUnit( p, 'h001', -13274,0, 8753,5, 261,680 )
set u = CreateUnit( p, 'h001', -12685,6, 8818,2, 340,235 )
set u = CreateUnit( p, 'h001', -12643,0, 9009,3, 61,965 )
set u = CreateUnit( p, 'h001', -12984,5, 8753,8, 85,103 )
set u = CreateUnit( p, 'h001', -13199,6, 8873,7, 82,037 )
set u = CreateUnit( p, 'h001', -12873,9, 8944,6, 207,945 )
set u = CreateUnit( p, 'h002', -12564,3, 9083,7, 138,904 )
set u = CreateUnit( p, 'h002', -12781,0, 9146,0, 43,013 )
set u = CreateUnit( p, 'h003', -12995,1, 9088,2, 261,966 )
set u = CreateUnit( p, 'h003', -13226,2, 9065,3, 333,215 )
set u = CreateUnit( p, 'nfro', -9387,0, 11184,4, 2,175 )
set u = CreateUnit( p, 'nfro', -9450,1, 12004,7, 87,882 )
set u = CreateUnit( p, 'nfro', -9609,7, 12873,9, 128,357 )
set u = CreateUnit( p, 'nfro', -9549,2, 13976,5, 241,794 )
set u = CreateUnit( p, 'nfro', -10343,7, 14057,2, 167,854 )
set u = CreateUnit( p, 'nfro', -10720,4, 13986,0, 125,556 )
set u = CreateUnit( p, 'nfro', -11507,4, 13328,1, 33,685 )
set u = CreateUnit( p, 'nfro', -12069,6, 12950,0, 346,344 )
set u = CreateUnit( p, 'necr', -12548,4, 13275,9, 214,438 )
set u = CreateUnit( p, 'necr', -14111,6, 13438,3, 135,466 )
set u = CreateUnit( p, 'necr', -14030,1, 14368,9, 309,692 )
set u = CreateUnit( p, 'nshe', -12886,7, 11665,8, 28,126 )
set u = CreateUnit( p, 'ndog', -14035,9, 13374,8, 129,807 )
endfunction
//===========================================================================
function CreatePlayerBuildings takes nothing returns nothing
endfunction
//===========================================================================
function CreatePlayerUnits takes nothing returns nothing
call CreateUnitsForPlayer0( )
endfunction
//===========================================================================
function CreateAllUnits takes nothing returns nothing
call CreatePlayerBuildings( )
call CreateNeutralPassive( )
call CreatePlayerUnits( )
endfunction
//***************************************************************************
//*
//* Triggers
//*
//***************************************************************************
//===========================================================================
// Trigger: Init
//===========================================================================
function Trig_Init_Actions takes nothing returns nothing
call ModifyGateBJ( bj_GATEOPERATION_OPEN, gg_dest_B006_0949 )
endfunction
//===========================================================================
function InitTrig_Init takes nothing returns nothing
set gg_trg_Init = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Init, 0.10 )
call TriggerAddAction( gg_trg_Init, function Trig_Init_Actions )
endfunction
//===========================================================================
function InitCustomTriggers takes nothing returns nothing
call InitTrig_Init( )
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( -15616,0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 1280,0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), -7168,0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 15360,0 - GetCameraMargin(CAMERA_MARGIN_TOP), -15616,0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 15360,0 - GetCameraMargin(CAMERA_MARGIN_TOP), -7168,0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 1280,0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) )
call SetDayNightModels( "Environment\\DNC\\DNCAshenvale\\DNCAshenvaleTerrain\\DNCAshenvaleTerrain.mdl", "Environment\\DNC\\DNCAshenvale\\DNCAshenvaleUnit\\DNCAshenvaleUnit.mdl" )
call NewSoundEnvironment( "Default" )
call SetAmbientDaySound( "AshenvaleDay" )
call SetAmbientNightSound( "AshenvaleNight" )
call SetMapMusic( "Music", true, 0 )
call CreateAllDestructables( )
call CreateAllUnits( )
call InitBlizzard( )
call InitGlobals( )
call InitCustomTriggers( )
endfunction
//***************************************************************************
//*
//* Map Configuration
//*
//***************************************************************************
function config takes nothing returns nothing
call SetMapName( "TRIGSTR_050" )
call SetMapDescription( "" )
call SetPlayers( 1 )
call SetTeams( 1 )
call SetGamePlacement( MAP_PLACEMENT_USE_MAP_SETTINGS )
call DefineStartLocation( 0, 1600,0, -11264,0 )
// Player setup
call InitCustomPlayerSlots( )
call SetPlayerSlotAvailable( Player(0), MAP_CONTROL_USER )
call InitGenericPlayerSlots( )
endfunction |
| 12-03-2004, 06:03 PM | #2 |
There is a "bug" in world editor which gives you a compile error for nothing. If you save your map and it gave a compile error, it did actually save. Just close the editor and reload the map, save again, then all should be fine. |
| 12-03-2004, 06:16 PM | #3 |
O, I see thanks :D |
