HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

jass globals

02-18-2006, 11:17 PM#1
Linera
When i define globals in Custom Script code. Why it gives errors?

here is the globals:
Collapse JASS:
globals
    // Random distribution vars
    integer            randDistCount            = 0
    integer array      randDistID
    real array         randDistChance
endglobals
02-18-2006, 11:45 PM#2
shadow1500
You define them at the beginning of the j file, you cant define them anywhere else.
02-18-2006, 11:47 PM#3
Linera
so then how do I define globals in jass?
02-19-2006, 12:00 AM#4
Anitarf
You don't, you just use GUI for it.
02-19-2006, 12:28 AM#5
Linera
so jass only has locals?

cause if i use gui globals then i'd need to use gui scripting.
02-19-2006, 12:50 AM#6
Zoxc
WE generates the globals for you. To use a global in Jass write udg_<name>.
02-19-2006, 12:54 AM#7
Vexorian
you use Ctrol+B to generate the variables. It is not really GUI scripting.

And JASS has globals only problem is that WE doesn't allow us a good way to create globals in JASS (because it is LAME) . You can create globals by modiffying blizzard.j or if you had the pleasure to actually make a map by editing the script directly and screwing the rest
02-19-2006, 12:52 PM#8
Chuckle_Brother
That is lame, why couldn't they give us thread global variables?
02-19-2006, 02:06 PM#9
Anitarf
"Thread global" variables?
02-19-2006, 04:14 PM#10
shadow1500
You can use gamecache with H2I(GetTriggeringTrigger()) as trigger global, if thats what u mean by thread globals.