this code will work for you, notice how i used the variable names sum and myresult.
they incurr the same result but due to functions local and global properties we carry local functions sum over to myresult.
sync on : sync rate 60 : backdrop on
myresult = peace(5,6)
disable escapekey : while escapekey()=0
text 10,10,STR$(myresult)
sync : endwhile
end
function peace(a,b)
sum = (a + b)
endfunction sum
If no-one gives your an answer to a question you have asked, consider:- Is your question clear.- Did you ask nicely.- Are you showing any effort to solve the problem yourself