Some useful tips when you start modding
Adding the line
DEBUGMODE 1
to the USER.TXT file in My Documents/My Games/BBCBA will turn on debug mode, which adds additional tooltips, logging, and other useful info.
Editing scripts is much easier if you grab the recommended tools. You get syntax highlighting, bracket checking, and it's all free! http://www.slitherinebravo.net/GameWiki/doku.php?id=stub_engine#tools
You can get your scripts to output information to a debug text pane. You do this by using the Log function in the script.
Log("Checking", GetUnitX(id), GetUnitY(id), GetUnitActive(id), GetTileLOS(GetUnitX(id), GetUnitY(id), 1)) ;
Note that a logging call can have between 0 and 4 numeric values after the description string, which will be output to the debug pane. To toggle the debug pane, hit F6 when in battle.