The compiler is generating the errors line number from the combined modules. Here is three modules, source attached. This will generate an error in line 28 even though not one module contain a line 28.
Test.dba
gosub _init
MakeCube()
ColorCube()
do
yrotate object 1, wrapvalue(object angle y(1)+1)
sync
loop
init.dba
_init:
sync on
sync rate 60
backdrop on
color backdrop 0
autocam off
position camera 0, 0, -50
return
func.dba
function MakeCube()
make object cube 1, 20
endfunction
function ColorCube()
color object 1, 0xFFFFFF00, 0
endfunction
Here is the combined code.
FullSourceDump.dba
gosub _init
MakeCube()
ColorCube()
do
yrotate object 1, wrapvalue(object angle y(1)+1)
sync
loop
_init:
sync on
sync rate 60
backdrop on
color backdrop 0
autocam off
position camera 0, 0, -50
return
function MakeCube()
make object cube 1, 20
endfunction
function ColorCube()
color object 1, 0xFFFFFF00, 0
endfunction