- Joined
- Sep 18, 2007
- Messages
- 104
Intro:
I've haven't touched WC3 for a while, hence I haven't touched the editor in a while. A friend asked me to help him with some triggers on a map and I am not as in touch with JASS as I used to be and I have reached a problem. Hoping someone can help, I am sure it's an easy fix, thanks in advance.
Problem:
The synthax checker gives me the errors:
-See below(post 5)
If you need any other info, just ask.
I've haven't touched WC3 for a while, hence I haven't touched the editor in a while. A friend asked me to help him with some triggers on a map and I am not as in touch with JASS as I used to be and I have reached a problem. Hoping someone can help, I am sure it's an easy fix, thanks in advance.
Problem:
JASS:
globals
integer EastBattleRegion
integer MidSouthBattleRegion
integer NorthEastBattleRegion
integer NorthWestBattleRegion
integer SouthWestBattleRegion
endglobals
function Yuan_Battle_Actions takes nothing returns nothing
local real array r
local location loc1 = GetUnitLoc(GetTriggerUnit())
local location loc2
if ( IsUnitEnemy(GetTriggerUnit(), Player(0)) == true ) then
call PauseUnit(GetTriggerUnit(), true)
call PauseUnit(gg_unit_h006_0018, true)
set loc2 = GetRectCenter(gg_rct_East_Battle_Region)
set r[EastBattleRegion] = DistanceBetweenPoints(loc1, loc2)
set loc2 = GetRectCenter(gg_rct_MidSouth_Battle_Region)
set r[MidSouthBattleRegion] = DistanceBetweenPoints(loc1, loc2)
set loc2 = GetRectCenter(gg_rct_NorthEast_Battle_Region)
set r[NorthEastBattleRegion] = DistanceBetweenPoints(loc1, loc2)
set loc2 = GetRectCenter(gg_rct_NorthWest_Battle_Region)
set r[NorthEastBattleRegion] = DistanceBetweenPoints(loc1, loc2)
set loc2 = GetRectCenter(gg_rct_SouthWest_Battle_Region)
set r[SouthWestBattleRegion] = DistanceBetweenPoints(loc1, loc2)
if ( (r[EastBattleRegion]) <= ((r[MidSouthBattleRegion]) and (r[NorthEastBattleRegion]) and (r[NorthWestBattleRegion]) and (r[SouthWestBattleRegion])) ) then //This line causes an error
//Move to East Battle Region
elseif ( (r[MidSouthBattleRegion]) <= ((r[NorthEastBattleRegion]) and (r[NorthWestBattleRegion]) and (r[SouthWestBattleRegion])) ) then //This line causes an error
//Move to MidSouth Battle Region
elseif ( (r[NorthEastBattleRegion]) <= ((r[NorthWestBattleRegion]) and (r[SouthWestBattleRegion])) ) then //This line causes an error.
//Move to NorthEast Battle Region
elseif ( (r[NorthWestBattleRegion]) <= (r [SouthWestBattleRegion]) ) then
//Move to NorthWest Battle Region
else
//Move to SouthWest Battle Region
endif
endif
endfunction
//===========================================================================
function XiahouYuanBattle takes nothing returns nothing
local trigger YuanBattle = CreateTrigger()
call TriggerRegisterUnitInRangeSimple( YuanBattle, 50.00, gg_unit_h006_0018 )
call TriggerAddAction( YuanBattle, function Yuan_Battle_Actions )
endfunction
The synthax checker gives me the errors:
-See below(post 5)
If you need any other info, just ask.
Last edited: