Chaosy
Tutorial Reviewer
- Joined
- Jun 9, 2011
- Messages
- 13,183
Hey, I wonder why would I use a scope or a lib in jass. I mean in which way is it useful to put code inside the scope or a lib?
so I need scopes if I use libs for my spell to make it work.
library abc requires def
where abc and def are both libraries.Seems ok and if I remember right you didn't need to use methods inside scopes?
scope AA initializer init
private function init takes nothing returns nothing
endfunction
endscope
scope A
scope B
endscope
endscope
library AAD initializer init requires AAA, AAB, optional AAC
private function init takes nothing returns nothing
endfunction
endlibrary
library AAC initializer init requires AAB, AAA
private function init takes nothing returns nothing
endfunction
endlibrary
library AAB
endlibrary
library AAA
endlibrary
//or also:
library AAQ
private scope sco
endscope
endlibrary
/*
be aware, that Vexorians JH has a glitch in which it will not compile private scopes
like this, you have to use dummy unes like:
*/
library AAQ
scope AAQA
endscope
private scope sco
endscope
endlibrary