- Joined
- May 1, 2008
- Messages
- 1,605
Seas =)
I have the following trigger:
So I want edit the next with ( Trig_Creep_Income_Func005001() ) my editor close itself, if i try to save or activate the trigger. But i write exactly the same like in Func004001 (Just change the 4 to 5) but it doesn't work.
If I use copy - paste it works, but if I write it manual - editor close itself.
Maybe someone know what happen to me all the time?
Edit: I'm learning Jass since 2 days - so I'm a Jass-noob. If you find something, to make a better trigger, or thing you would change anyway - say it please =)
Thanks
Dr. Boom
I have the following trigger:
JASS:
function Trig_Creep_Income_Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnteringUnit()) == 'u001' )
endfunction
function Trig_Creep_Income_Func002001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnteringUnit()) == 'u000' )
endfunction
function Trig_Creep_Income_Func003001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnteringUnit()) == 'u002' )
endfunction
function Trig_Creep_Income_Func004001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnteringUnit()) == 'u003' )
endfunction
function Trig_Creep_Income_Actions takes nothing returns nothing
if ( Trig_Creep_Income_Func001001() ) then
set udg_Income[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = ( udg_Income[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] + 1 )
endif
if ( Trig_Creep_Income_Func002001() ) then
set udg_Income[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = ( udg_Income[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] + 2 )
endif
if ( Trig_Creep_Income_Func003001() ) then
set udg_Income[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = ( udg_Income[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] + 3 )
endif
if ( Trig_Creep_Income_Func004001() ) then
set udg_Income[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = ( udg_Income[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] + 5 )
endif
endfunction
//===========================================================================
function InitTrig_Creep_Income takes nothing returns nothing
set gg_trg_Creep_Income = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Creep_Income, gg_rct_Summon_Area_Player_1 )
call TriggerRegisterEnterRectSimple( gg_trg_Creep_Income, gg_rct_Summon_Area_Player_2 )
call TriggerAddAction( gg_trg_Creep_Income, function Trig_Creep_Income_Actions )
endfunction
If I use copy - paste it works, but if I write it manual - editor close itself.
Maybe someone know what happen to me all the time?
Edit: I'm learning Jass since 2 days - so I'm a Jass-noob. If you find something, to make a better trigger, or thing you would change anyway - say it please =)
Thanks
Dr. Boom