Having a hard time understanding functions here. I\'ve read the TDK tutorial on functions, but still I\'m getting the infamous duplicated function name:
Quote: "The name \'prepend\' duplicated in the program inside jbmfunc.dba."
Here is the main program:
#include \"jbmfunc.dba\"
Rem Project: Dark Basic Pro Project
Rem Created: Monday, May 21, 2012
Rem ***** Main Source File *****
make matrix 1,5000,5000,150,150
randomize matrix 1,80
position matrix 1,0,0,0
update matrix 1
do
sync
update matrix 1
LOOP
prepend()
end
And here is the jbmfunc.dba file:
function prepend()
for i = 0 to 100 step 1
if matrix exist(i)=1 then delete matrix i
if image exist(i)=1 then delete image i
if bitmap exist(i)=1 then delete bitmap i
if music exist(i)=1 then delete music i
if sound exist(i)=1 then delete sound i
if object exist(i)=1 then delete object i
NEXT i
ENDFUNCTION
Now what is wrong here?