I remember not understanding the same thing OP, so I'll draw it out for you a bit.
When you save your map, the editor changes all of your triggers into JASS, in one big long file, called war3map.j
So if you have:
Trigger1 ( init )
Trigger2 ( call myfunc )
Trigger3 ( myfunc )
Then that's the order that they will be written, in war3map.j
NOW THEN, your problem is that the editor says it does not recognize a function. First, you must know that JASS is read from top to bottom, so let's look at this again:
Trigger1 ( init )
Trigger2 ( call myfunc ) <---- that trigger doesn't know what 'myfunc' is !
Trigger3 ( myfunc )
Because it's ABOVE the func.
So to fix this, you need to put your function above the place that you're calling it. Like Maker suggested, you could put your function in the map header, which is written above ALL your triggers in war3map.j
In the trigger editor, on the folder tree thing, click the actual map file (with the .w3x), and you can type code in there. That's the map header, and it gets written first.