Vanilla Jass Compilation

hgkjfhfdsj

Active Member
Reaction score
55
SOLVED
in what order are the triggers compiled. is it random, or a particular order. its because usually when you do this
JASS:
function one takes nothing
endfunction
//new trigger
function two takes nothing
   call one()
endfunction

it sometimes gives you error when these two functions are placed in different triggers. i shuffled the triggers around and it appears that it compiles the code from the bottom trigger to the top in order of the categories.
ie
JASS:
Categories
   Trigger 1
   Trigger 2

if functions in Trigger 2 is required in Trigger 1, this would compile (tested)
is there like any particular 'types' of custom functions that can compile like the above?
i just wanted to confirm this :)
edit2:
- perhaps in order of their creation?

[DEL]edit: maybe not... but i still want confirmation[/DEL]
 

Romek

Super Moderator
Reaction score
963
You could put code in the map header to ensure it's above every other trigger in the map script. Just click the map name above all the categories in the trigger editor, and code away.

I don't know the order in which triggers are compiled. I would have assumed it was either in the order they were created, or the order in which they are in the editor. Neither seems to be true, based on your post. :p
 

hgkjfhfdsj

Active Member
Reaction score
55
im pretty sure its in the order they were created in xD (tested)
using the map header is ok for say one system, but it gets messy once you c&p 10+ different systems :p. but in order of creation isnt much better/convenient either..
 

Romek

Super Moderator
Reaction score
963
> using the map header is ok for say one system, but it gets messy once you c&p 10+ different systems
Exactly. That's one of many, many reasons why people use vJass.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top