• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

help please

Status
Not open for further replies.
Level 2
Joined
Jun 16, 2013
Messages
6
Undefined function 'StopSpellFromCasting'

Undefined function 'ReplaceUnitAdvanced'

Undefined function 'GetLastreplacedUnitBJ'

Undefined function "SelectUnitAddForPlayer'

please help i keep getting those 4 errors
 
Last edited:
here you area

here you go

JASS:
function Trig_Horizontal_Gate1_Conditions takes nothing returns boolean
if (not (GetUnitTypeId(GetTriggerUnit())=='h022')) then
return false
endif
if (not (GetSpellAbilityId()=='A01Q')) then
return false
endif
return true
endfunction
function Trig_Horizontal_Gate1_Actions takes nothing returns nothing
call StopSpellFromCasting(GetSpellAbilityUnit())
call ReplaceUnitAdvanced(GetSpellAbilityUnit(),'h023',bj_UNIT_STATE_METHOD_RELATIVE)
call SetUnitAnimation(GetLastReplacedUnitBJ(),"Death Alternate")
call SelectUnitAddForPlayer(GetLastReplacedUnitBJ(),GetOwningPlayer(GetSpellAbilityUnit()))
endfunction
function InitTrig_Horizontal_Gate1 takes nothing returns nothing
set gg_trg_Horizontal_Gate1=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Horizontal_Gate1,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Horizontal_Gate1,Condition(function Trig_Horizontal_Gate1_Conditions))
call TriggerAddAction(gg_trg_Horizontal_Gate1,function Trig_Horizontal_Gate1_Actions)
endfunction
JASS:
function Trig_Vertical_Gate1_Conditions takes nothing returns boolean
if (not (GetUnitTypeId(GetTriggerUnit())=='h029')) then
return false
endif
if (not (GetSpellAbilityId()=='A01Q')) then
return false
endif
return true
endfunction
function Trig_Vertical_Gate1_Actions takes nothing returns nothing
call StopSpellFromCasting(GetSpellAbilityUnit())
call ReplaceUnitAdvanced(GetSpellAbilityUnit(),'h02B',bj_UNIT_STATE_METHOD_RELATIVE)
call SetUnitAnimation(GetLastReplacedUnitBJ(),"Death Alternate")
call SelectUnitAddForPlayer(GetLastReplacedUnitBJ(),GetOwningPlayer(GetSpellAbilityUnit()))
endfunction
function InitTrig_Vertical_Gate1 takes nothing returns nothing
set gg_trg_Vertical_Gate1=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Vertical_Gate1,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Vertical_Gate1,Condition(function Trig_Vertical_Gate1_Conditions))
call TriggerAddAction(gg_trg_Vertical_Gate1,function Trig_Vertical_Gate1_Actions)
endfunction
JASS:
function Trig_Vertical_Gate1_Copy_Conditions takes nothing returns boolean
if (not (GetUnitTypeId(GetTriggerUnit())=='h02B')) then
return false
endif
if (not (GetSpellAbilityId()=='A01V')) then
return false
endif
return true
endfunction
function Trig_Vertical_Gate1_Copy_Actions takes nothing returns nothing
call StopSpellFromCasting(GetSpellAbilityUnit())
call ReplaceUnitAdvanced(GetSpellAbilityUnit(),'h029',bj_UNIT_STATE_METHOD_RELATIVE)
call SelectUnitAddForPlayer(GetLastReplacedUnitBJ(),GetOwningPlayer(GetSpellAbilityUnit()))
endfunction
function InitTrig_Vertical_Gate1_Copy takes nothing returns nothing
set gg_trg_Vertical_Gate1_Copy=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Vertical_Gate1_Copy,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Vertical_Gate1_Copy,Condition(function Trig_Vertical_Gate1_Copy_Conditions))
call TriggerAddAction(gg_trg_Vertical_Gate1_Copy,function Trig_Vertical_Gate1_Copy_Actions)
endfunction
JASS:
function Trig_Horizontal_Gate2_Conditions takes nothing returns boolean
if (not (GetUnitTypeId(GetTriggerUnit())=='h023')) then
return false
endif
if (not (GetSpellAbilityId()=='A01V')) then
return false
endif
return true
endfunction
function Trig_Horizontal_Gate2_Actions takes nothing returns nothing
call StopSpellFromCasting(GetSpellAbilityUnit())
call ReplaceUnitAdvanced(GetSpellAbilityUnit(),'h022',bj_UNIT_STATE_METHOD_RELATIVE)
call SelectUnitAddForPlayer(GetLastReplacedUnitBJ(),GetOwningPlayer(GetSpellAbilityUnit()))
endfunction
function InitTrig_Horizontal_Gate2 takes nothing returns nothing
set gg_trg_Horizontal_Gate2=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Horizontal_Gate2,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Horizontal_Gate2,Condition(function Trig_Horizontal_Gate2_Conditions))
call TriggerAddAction(gg_trg_Horizontal_Gate2,function Trig_Horizontal_Gate2_Actions)
endfunction
 
i need to see the functions that ur having a problem with. i cant see them here.

also u should learn to inline the old GUI functions. ( all the red text)
and u should take a look at my tutorial GUI to JASS. it will show u how to make ur code more efficient. As a last not plz learn how to indent the correct way.
ur code is incredibly hard to read like that.
 
do you have skype my friend made this trigger back before there was a new patch they it went kaput at 1.26 version of wc3
 
im not allowed to post my friends map publicly on forums but i might be able to send it to you over email or something else
 
The thing is: You can't use in a function anything that isn't pre-declared. If you declare Function A
Function B
Function C

You can't use Function C on B or A since it hasn't been declared yet. Basically, they still doesn't exist when Wc3 is parsing all the text.
 
Status
Not open for further replies.
Back
Top