Revival Trigger?

Demi666

New Member
Reaction score
127
kk so.... it says i have missing endfunctions and stuff, and i cant see no missing endfunction

also the if/then/else is wrong to it seems.
now i havent done jass in a while so you have to excuse my baaaaaaad coding

JASS:
function Trig_Revival_Conditions takes nothing returns boolean
   return IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)
endfunction


function Trig_Revival_Actions takes nothing returns nothing
local location l
local timer t
local unit u = GetDyingUnit()
local integer level = GetUnitLevel(u)
local real Wait = 5.00
local real WaitForRevive = Wait*level

        if IsUnitEnemy(u,Player(0))    
            then set l = GetRectCenter(gg_rct_Inhabitant_Start)
        else set l = GetRectCenter(gg_rct_Humans_Start)

 
    call TimerStart(t,WaitForRevive,false.function Revive)
    call CreateTimerDialog(t)
    call TimerDialogDisplayForPlayerBJ(true,t,GetOwningPlayer(u)) 
 
endfunction

function Revive takes unit u location l returns nothing
call ReviveHeroLoc(u,l,true)
endfunction

//===========================================================================
function InitTrig_Revival takes nothing returns nothing
    set gg_trg_Revival = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Revival, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition( gg_trg_Revival, Condition( function Trig_Revival_Conditions ) )
    call TriggerAddAction( gg_trg_Revival, function Trig_Revival_Actions )
endfunction
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
Code:
call TimerStart(t,WaitForRevive,false[B],[/B]function Revive)

:D
 

Demi666

New Member
Reaction score
127
ahh man.. i just remembered what hero told me over msn... a timercallback cant take anything....

" expected returns "
JASS:
function Revive takes unit u location l returns nothing


anyone here got uhm id remember the system name, but anyone got it^^?
 

Arkan

Nobody rides for free
Reaction score
92
You should learn when to use commas and when to use points :)
, in coding/functions
. in real numbers
 

Demi666

New Member
Reaction score
127
You should learn when to use commas and when to use points :)
, in coding/functions
. in real numbers

O... M... G...

Dude your absolutely right im completely stupid i mean, it was that i didnt know it(lol..)
and it wasent that i didnt see it? noooohhh man im dumb thanks for telling me
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
You should learn when to use commas and when to use points :)
, in coding/functions
. in real numbers

That is kind of general and vague.

To be more specific,

, when switching parameters
. in real numbers and for structs

:D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top