bevor? what dont you mean before?
Well about your problem.
of course allt he functions are called before start the game, since they are " compiled" and check for errors...
your function must be defined no matter what, before the calling process, otherwise, its impossible to call something that does not exists.
Now you can call functions that are core functions, and contains the function itself, after the call, if and only you did prototype it first. Example:
function main() { hello(); } // this wont work, your calling something that
doesn't exist before the call of the hello() function.
function hello(){ error("HELLO"); }
--------------
but.. this will work, if you (put the function on the top like:)
function hello(){ error("HELLO"); }
function main() { hello(); } // this will work, because the hello function is defined already. and you can call its name.
-------- OR --- by prototyping the function which is this..
function hello();
function main() { hello(); }
function hello(){ error("HELLO"); }
in this last case:
the main function that starts the game, call the function hello(), defined above, but that functions as you can see contains no code, or functions or methods. its just the definition name , so the engine now knows there is somewhere a function called hello().
in this case, its right after the call.
Dont forget, that calling a prototyped function, will require to construct the functional function with code, in this example the core function which is error("hello"); otherwise there was nothing to do, and no need to define such function.
I hope you understood.