HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Expected end of line

03-14-2005, 05:27 AM#1
leonine
Quote:
function Trig_Deathtrigger_Actions takes nothing returns nothing
if ( IsUnitEnemy(GetDyingUnit(), GetOwningPlayer(GetKillingUnitBJ())) == true ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))] + ( GetPlayerName(GetOwningPlayer(GetKillingUnitBJ())) + ( "|r just pawned " + ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))] + ( GetPlayerName(GetOwningPlayer(GetDyingUnit())) + ( "|r's head for an extra " + ( I2S(( 100 + ( GetHeroLevel(GetDyingUnit()) * 5 ) )) + " gold!" ) ) ) ) ) ) ) )
call AdjustPlayerStateBJ( ( 100 + ( GetHeroLevel(GetDyingUnit()) * 5 ) ), GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_GOLD )
endif
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(7) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(8) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(9) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(10) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(11) ) ) then
if ( udg_TeamReincarnation[1] > 0 ) then
set udg_TeamReincarnation[1] = ( udg_TeamReincarnation[1] - 1 )
call Invulnerability(GetTriggerUnit())
else
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "|cffff0000 Level " + ( I2S(GetHeroLevel(GetDyingUnit())) + ( " Sentinel Death.|r Revival in " + ( I2S(( GetHeroLevel(GetDyingUnit()) * 4 )) + " seconds." ) ) ) ) )

call AdjustPlayerStateBJ( ( GetHeroLevel(GetDyingUnit()) * -30 ), GetOwningPlayer(GetDyingUnit()), PLAYER_STATE_RESOURCE_GOLD )
if ( udg_ItemDrop == true ) then
call UnitRemoveItemFromSlotSwapped( GetRandomInt(1, 6), GetDyingUnit() )
else
call AdjustPlayerStateBJ( ( GetHeroLevel(GetDyingUnit()) * -30 ), GetOwningPlayer(GetDyingUnit()), PLAYER_STATE_RESOURCE_GOLD )
endif
call StartTimerBJ( udg_PTimer[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))], false, ( I2R(GetHeroLevel(GetDyingUnit())) * 4.00 ) )
call TriggerSleepAction( I2R(GetHeroLevel(GetDyingUnit())) * 4.00 ) )
call PanCameraToTimedLocForPlayer( GetTriggerPlayer(), GetRectCenter(gg_rct_Hero_Creation_Evil), 2.00 )
call ReviveHeroLoc( GetTriggerUnit(), GetRectCenter(gg_rct_Hero_Creation_Evil), true )
endif
endif
endif
endif
endif
endif
My problem occurs on this line: call TriggerSleepAction( I2R(GetHeroLevel(GetDyingUnit())) * 4.00 ) ). It just says expected end of line? What's wrong with this?
03-14-2005, 06:56 AM#2
aaero
call TriggerSleepAction([1]
I2R([2]
GetHeroLevel([3]
GetDyingUnit([4]
)[4]
)[3]
)[2]
* 4.00 )[1]
)[?]

You've got one more closing parentheses than you do open parentheses. I would just take the closing parentheses right after GetDyingUnit out, it should fix it right up.