Hey entomophobia,
Before you use this code, please grab the current update that was released today in "purchased downloads". You'll find it at the bottom of that page.
Here's some example code to help you out.
DBPro Source
load script "yourscript.gm"
script load dbp function 1,"staticmsg",0
script load dbp function 2,"printmsg",1
script load dbp function 3,"printmsg2",2
script function "mainfunction"
print "press any key to exit..."
wait key
end
function staticmsg()
print "This message doesn't require any parameters."
endfunction
function printmsg(message$)
print message$
endfunction
function printmsg2(message$,number)
print message$
print "The number passed to this function: " + str$(number)
endfunction
Script Source
global mainfunction = function()
{
staticmsg();
dbpro.call("printmsg","This is a user function using 1 parameter");
dbpro.call("printmsg2","This is a user function using 2 parameters",4);
};