HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

vJass global limitations

03-14-2008, 12:05 AM#1
Joker
I remember Vex saying somewhere that some handles don't work with the vJass globals. Which ones?
03-14-2008, 12:12 AM#2
Rising_Dusk
I personally think that they all work, though ones I probably would find silly are 'widget' & 'code'. Maybe someone else can give a more significant answer, though.
03-14-2008, 12:51 AM#3
moyack
You can have all kind of handles as globals, but some of them can't be initialized directly as we want.

Collapse Will crash or fail horribly:
globals
   region R = CreateRegion() //<=Will crash ingame

   rect RECT = Rect(0,0,0,0) //<= works nice :)
   timer T = CreateTimer() //<= Nil problem...
   /etc
endglobals

struct
   code C //<= it won't compile because code handle can't be set in an array
endstruct
03-14-2008, 01:27 AM#4
Joker
Ah, I see. Thank you both.