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!
Hi,
as the title says, i have a function in a scope to get access to private data.
the function itself is public, but i still cannot call it from outside. what did i do wrong?
Scopes do not move code to the top like libraries do,
so it needs to be ensured that the scope is over the caller function.
Also to call a public scope function from outside it needs the scope
name as identifier before the function name. "ScopeName_FunctionName()"
Example:
JASS:
scope a
public function foo takes nothing returns nothing
endfunction
endscope
function bar takes nothing returns nothing
call a_foo()
endfunction
If the scope should provide functions that should be able to be used from anywhere,
then it should not be a scope, but just a library.
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.