@ Game designer extraordinaire:
Adding to what Baxslash said:
It's also best to put an END before the first function because if the function is actually seen it'll end the program with an error. Run the following code as is once then REM off the END and run it again to see the error.
Baxslashes great examples in one snip:
`example of use
print_my_text("Hello World")
`example of use
print add_two_numbers(3, 4)
wait key
` Always put an END before the first function otherwise it'll produce an error
end
` Print mytext$
function print_my_text(mytext$)
print mytext$
endfunction
` Adding numbers
function add_two_numbers(num1, num2)
answer=num1 + num2
endfunction answer
Quote: "I have looked all over the internet for a solution."
If you check out TDKs Tutorials you'll get a better understanding of the basics of Darkbasic.
http://forum.thegamecreators.com/?m=forum_view&t=99497&b=10