HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need help: 463 compile errors O_o

04-18-2004, 07:03 AM#1
AnarkiNet
ok, i have (as the title says) 463 compile errors, but none of them highlight any "damaged" code (?) so im having a hard time isolating the problem(s), anyways, here are the triggers i think might be causing it, but i dont see anything wrong with them (im relatively new to JASS, so hopefully someone else can help me)

Mystic Retaliation effect:
Code:
function Trig_Mystic_Retaliation_effect_Actions takes nothing returns nothing
  local integer x = GetRandomInt(1, 100)
  local location heroPoint = GetUnitLoc(gg_unit_E003_0036)
  local location targetPoint = GetUnitLoc(GetAttacker())
  local unit whichCaster
  local unit whichAttacker = GetAttacker()
  local player whichOwner= GetOwningPlayer(gg_unit_E003_0036)
  if ( not ( x <= ( 20 + ( GetUnitAbilityLevelSwapped('A00L', gg_unit_E003_0036) * 5 ) ) ) ) then
	call CreateNUnitsAtLoc( 1, 'o002', whichOwner, heroPoint, AngleBetweenPoints(heroPoint, targetPoint) )
	set whichCaster = GetLastCreatedUnit()
	call IssueTargetOrder( whichCaster, "faeriefire", whichAttacker )
  endif
  call RemoveLocation(heroPoint)
  call RemoveLocation(targetPoint)
  set whichAttacker = null
  set heroPoint = null
  set targetPoint = null
  set whichOwner = null
  call TriggerSleepAction( 1.00 )
  call RemoveUnit(whichCaster)
  set whichCaster = null
endfunction
//===========================================================================
function InitTrig_Mystic_Retaliation_effect takes nothing returns nothing
	set gg_trg_Mystic_Retaliation_effect = CreateTrigger(  )
	call DisableTrigger( gg_trg_Mystic_Retaliation_effect )
	call TriggerRegisterUnitEvent( gg_trg_Mystic_Retaliation_effect, gg_unit_E003_0036, EVENT_UNIT_ATTACKED )
	call TriggerAddAction( gg_trg_Mystic_Retaliation_effect, function Trig_Mystic_Retaliation_effect_Actions )
endfunction


Hero Move:
Code:
function Trig_Hero_Move_Actions takes nothing returns nothing
  local location whichPoint = PolarProjectionBJ(Location(0.00, 0), GetRandomReal(70.00, 2400.00), GetRandomDirectionDeg())
  local unit whichHero = GetChangingUnit()
  local player whichPlayer = GetOwningPlayer(GetChangingUnit())
  local integer x = GetConvertedPlayerId(GetOwningPlayer(GetChangingUnit()))
  if ( not ( RectContainsUnit(gg_rct_Hero_Pick_Area, GetChangingUnit()) == true ) ) then
	call SetUnitPositionLoc( whichHero, whichPoint )
	call PanCameraToTimedLocForPlayer( whichPlayer, whichPoint, 0.00 )
	call SetUnitManaPercentBJ( whichUnit, 100 )
	call CreateFogModifierRadiusLocBJ( true, whichPlayer, FOG_OF_WAR_VISIBLE, Location(0, 0), 2500.00 )
	set udg_player_heros[x] = whichHero
	if ( not ( whichHero == gg_unit_E006_0045 ) ) then
	  call SetPlayerAbilityAvailableBJ( false, 'A018', whichPlayer )
	endif
	if ( not ( whichHero == gg_unit_E003_0036 ) ) then
	  call SetPlayerAbilityAvailableBJ( false, 'A00P', whichPlayer )
	endif
  endif
  call SetHeroLevelBJ( whichHero, 1, false )
  call ModifyHeroSkillPoints( whichHero, bj_MODIFYMETHOD_SET, 1 )
  call RemoveLocation(whichPoint)
  set whichHero = null
  set whichPlayer = null
  set whichPoint = null
endfunction
//===========================================================================
function InitTrig_Hero_Move takes nothing returns nothing
	set gg_trg_Hero_Move = CreateTrigger(  )
	call TriggerRegisterAnyUnitEventBJ( gg_trg_Hero_Move, EVENT_PLAYER_UNIT_CHANGE_OWNER )
	call TriggerAddAction( gg_trg_Hero_Move, function Trig_Hero_Move_Actions )
endfunction

ArenaInit
Code:
function Trig_ArenaInit_Actions takes nothing returns nothing
  local location whichPoint
  local integer i = 0
  loop
	exitwhen i > 10
	if ( IsPlayerInForce(ConvertedPlayer(i), udg_Team1) ) then
	  set whichPoint = GetRandomLocInRect(udg_Team1Rect)
	  if ( IsUnitAliveBJ(udg_player_heros[i]) ) then
		call SetUnitPositionLoc( udg_player_heros[i], whichPoint )
	  elseif ( IsUnitDeadBJ(udg_player_heros[i]) ) then
		call ReviveHeroLoc( udg_player_heros[i], whichPoint, false )
	  endif
	elseif ( IsPlayerInForce(ConvertedPlayer(i), udg_Team2) ) then
	  set whichPoint = GetRandomLocInRect(udg_Team2Rect)
	  if ( IsUnitAliveBJ(udg_player_heros[i]) ) then
		call SetUnitPositionLoc( udg_player_heros[i], whichPoint )
	  elseif ( IsUnitDeadBJ(udg_player_heros[i]) ) then
		call ReviveHeroLoc( udg_player_heros[i], whichPoint, false )
	  endif
	endif
	call SetUnitLifePercentBJ( udg_player_heros[i], 100 )
	call SetUnitManaPercentBJ( udg_player_heros[i], 100 )
	call UnitResetCooldown( udg_player_heros[i] )
	call UnitRemoveBuffsExBJ( bj_BUFF_POLARITY_EITHER, bj_BUFF_RESIST_EITHER, udg_player_heros[i], true, false )
	call PanCameraToTimedLocForPlayer( ConvertedPlayer(i), whichPoint, 0 )
	call RemoveLocation(whichPoint)
	set i = i + 1
  endloop
  call RemoveLocation( whichPoint )
  set whichPoint = null
endfunction
//===========================================================================
function InitTrig_ArenaInit takes nothing returns nothing
	set gg_trg_ArenaInit = CreateTrigger(  )
	call TriggerAddAction( gg_trg_ArenaInit, function Trig_ArenaInit_Actions )
endfunction

that should be it, i think, but like i said, i didnt notice anything wrong with them. any help is most welcome.
04-18-2004, 08:11 AM#2
Cubasis
Eh, don't panic at the WE compiler, it very often gives you 100's or even 1000's of compile error becouse of a single problem. When you get compile errors in WE, just take them on, 1 by 1, starting at the top.

If you need help, paste the function the error pointed at, including most related functions, and highlight the line that WE complaints about.

Cubasis
04-18-2004, 05:25 PM#3
AnarkiNet
this is the problem, absolutely none of the errors point to any function. thats where im so screwed :(
04-18-2004, 06:54 PM#4
Narwanza
Are you sure it isn't in the map specific custom code box in you map?
04-25-2004, 12:59 AM#5
PEON1577
Quote:
Originally Posted by AnArKi
this is the problem, absolutely none of the errors point to any function. thats where im so screwed :(
just because everyone here luvs u as much as they do me [see rep pnts] i'll answer your question.

you want to go through the jass line by line manually making sure there arnt any subtile errors then if everything still looks perfect run it through a few syntax checkers:
http://jass.sourceforge.net/download.shtml <-- is the best i've found
Katana also has a syntax checker but it sux.

hope that helped! have fun debugging ^_^

Quote:
Originally Posted by linkmaster
The Rep system is stupid, I don't judge anyone off of it, and nor should anyone else.