Quote: "You can put functions on the top"
You can't "put" them at the top, that is, you cannot declare or make them at the top of the program. You can "call" them at the top like TheComet said. To "call" them is to use the function as if it is a command.
Quote: "Everytime I try to make my own custom function, I compile it, and it works fine..but when I execute my program (Checks For Graphics), it only tells me the program ran into a function declaration"
As TheComet demonstrated, when you design (declare) a function:
Function add_stuff(a,b)
result=a+b
Endfunction result
the declaration cannot be where the code of your program is running or else you will get the error "the program ran into a function declaration..." I believe this is just an error check so the function isn't declared over and over if it was accidentally put in a loop during the execution of regular code. Therefore the function must be declared outside of any running code.
It's best to put all of the function declarations at the bottom of your program right after the END command:
program code...
.
.
End
Function add(a,b)
etc.
endfunction
function dothis(string$)
etc.
endfunction
etc.
Enjoy your day.