Guessing, "educated" or not, is not a good way to approach coding tasks. It is a waste of time.
We need to know how that function is supposed to work in order to decide where it needs to be placed in your code.
Unfortunately, we don't have any clues from the existing code (your first post) - in fact, after you assign the result of the function to the variable [font=monospace]$member_credits[/font], you don't use it again.
Start with this:
1) What script are you "modifying"? Is it a CMS? Is it a collection of scripts you (or someone) have assembled to get what you want?
2) What does this function do? I know you've said it "provides members with credits to use on the site" - but that's too broad. Find the code that defines this function and post it (the definition will look something like this:
function get_member_credits( $userid ){
// some code in here
// more code
// etc.
}
3) Wherever you are placing this line in your code now, what goes wrong? Do you get an error message? Is something on the page missing, or incorrect? Does it have any effect on the output at all?