Linking Scripts in SphereScript
Chad Austin
aegisk@iastate.edu
2000.04.27


This question comes up often.  Let's say you have a script called 'battle.ss' which has
a function called Battle() that you want to use in all your other scripts.  You make a
type of file called a library header that has all the functions and types you want to use
in other scripts.  The format of this file (we'll call it battle.ssl) is as follows:

void Battle();

That's it.  It's quite simple, because we just want to export one function in the script.
You can also put data types in the .ssl files.  To inform battle.ss that it will be the
implementation of all functions declared in battle.ssl, put an "implement battle;" line
at the top of the script.

"But how do you let other scripts use the Battle() function?" you ask.  Add the following
line to the top of any script from which you want to call Battle():

use battle;

That's it.

Any questions/comments?  E-mail me.
