HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Questions 'bout scopes

08-22-2011, 09:48 PM#1
Yrth
so from what I understand scopes scramble all the variable/function names inside of them to prevent name collision with other triggers.
whats the point of the public / private keyword for scopes? public implies outside access, but I can't figure out how to do it

Collapse JASS:
scope example
     globals
          public unit u
     endglobals
endscope

how would i access the unit "u" from outside the scope?
08-22-2011, 09:59 PM#2
Anitarf
example_u This is generally considered ugly, so most people prefer to just give all public stuff long unique names and then skip the public keyword.