🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!
function foo takes unit returns nothing
call kill(unit)
endfunction
function bar takes nothing returns nothing
call foo(GetTriggerUnit())
endfunction
everything will work proberly
but if you would have writen it like this:
Code:
function bar takes nothing returns nothing
call foo(GetTriggerUnit())
endfunction
function foo takes unit returns nothing
call kill(unit)
endfunction
it woul give an error like "function name excpected" or something like that.
That is, becouse the function bar() does not 'know' the function foo(). A function knows only functions that have been created above itself.
therefore if you create two triggers in GUI, the one below does know the one above, but not vice versa (the editor fixes this if you use the GUI-Version of calling triggers)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.