Page 1 of 1

Calling a functions

Posted: Thu Feb 18, 2016 7:03 pm
by enric
I've a doubt (or many :? ), in the BATTLE/SCRIPTS, can a Function in a .BSF be called from a different .BSF?

I see that, for example, in FIRE_AP there is an INCLUDE FIRELOGIC_AP to be able to call functions there.
But, by a mine mistake I called a Function on another .BSF without using the INCLUDE, and it has been working for months !!!

What's the correct way?, and why it works if it should not?

Re: Calling a functions

Posted: Thu Feb 18, 2016 8:58 pm
by pipfromslitherine
I would need to see the code and the complete fileset to be sure - it's unlikely that you could call a function that wasn't included in some way in a script.

Cheers

Pip

Re: Calling a functions

Posted: Fri Feb 19, 2016 7:29 am
by enric
Well, I think the confusion comes from the misunderstanding how scripts are loaded.

If in several ACTIONS.BSF I try to call an external function and I put include "FireLogic_AP.bsf" in them I get the error message.
error.jpg
error.jpg (48.66 KiB) Viewed 2607 times
So I tried to putting the include in $DEFAULT.BSF, and not in each action.BSF, then it works