Whats wrong with my code?

ZZY

New Member
Reaction score
1
I made the "hero revive" trigger from the tutorial on the home page and it says i have 3 errors in my script, here it is
gldh.jpg

Expects a function name :

call StartTimerDialogBJ( ourtimer, false, ( I2R(HeroWait) ))
......................................................./\ i dont know what that char is, lower case L, upper i 1 or tube (button above/below enter)???

Expects end of line :

call TimerDialogDisplayForPlayerBJ(true, WINDOW, GetOwningPlayer(OURHERO)) )

Expects Name :
call ReviveHeroLoc(MyHero,GetRectCenter(gg_rct_Red_Death), true)

If you could help me out i would appreciate it, ZZ
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Expects a function name :

call StartTimerDialogBJ( ourtimer, false, ( I2R(HeroWait) ))
......................................................./\ i dont know what that char is, lower case L, upper i 1 or tube (button above/below enter)???

It's an uppercase "i" ;)

Expects end of line :

call TimerDialogDisplayForPlayerBJ(true, WINDOW, GetOwningPlayer(OURHERO)) )

Too many ")"...
Should be:
JASS:
call TimerDialogDisplayForPlayerBJ(true, WINDOW, GetOwningPlayer(OURHERO))


Expects Name :
call ReviveHeroLoc(MyHero,GetRectCenter(gg_rct_Red_Death), true)

MyHero should be replaced with OURHERO ;)
 

ZZY

New Member
Reaction score
1
The first one, even tho it was the right case, still gave me the error, the rest work fine
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
you know you could do
Local unit bla = GetTriggerUnit()
You dont have to set it later.
 

ZZY

New Member
Reaction score
1
you know you could do
Local unit bla = GetTriggerUnit()
You dont have to set it later.

im sorry, i dont fully understand, were would that go or replace and what would bla =?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
The first one, even tho it was the right case, still gave me the error, the rest work fine

Hehe XD That's because there is nothing called [ljass]StartTimerDialogBJ[/ljass]...
It's supposed to be plain [ljass]StartTimerBJ[/ljass] ;)

im sorry, i dont fully understand, were would that go or replace and what would bla =?

He just meant that this:
JASS:
local timerdialog WINDOW
local integer HeroWait
local timer ourtimer
local unit OURHERO
// And then setting them afterwards...

Can just be this:
JASS:
local unit OURHERO = GetTriggerUnit()
local integer HeroWait = GetHeroLeve( OURHERO ) * 150
local timer ourtimer = CreateTimer()
local timerdialog WINDOW
 

ZZY

New Member
Reaction score
1
its not in jass, this is what comes up when i click enable in the trigger editor.
 

kaboo

New Member
Reaction score
45
forget about it and use this instead:
Trigger:
  • hero dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Game - Display to (All players) the text: whatever u want
      • Unit Group - Add (Triggering unit) to dead_heroes
      • Countdown Timer - Start timer[(Player number of (Owner of (Triggering unit)))] as a One-shot timer that will expire in 30.00 seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title hero resp
      • Countdown Timer - Hide (Last created timer window)
      • Countdown Timer - Show (Last created timer window) for (Owner of (Triggering unit))
      • Set timer_window[(Player number of (Owner of (Triggering unit)))] = (Last created timer window)

Trigger:
  • hero revive
    • Events
      • Time - timer[1] expires
      • Time - timer[2] expires
      • Time - timer[3] expires
      • .......
      • Time - timer[12] expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in dead_heroes and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Remaining time for timer[(Player number of (Owner of (Picked unit)))]) Equal to 0.00
            • Then - Actions
              • Hero - Instantly revive (Picked unit) at (Random point in (Playable map area)), Show revival graphics
              • Countdown Timer - Destroy timer_window[(Player number of (Owner of (Picked unit)))]
            • Else - Actions
 
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