ActionScriptInt always returns 0. Am I doing something wrong?

I have some code in an .as file.


function someFunction():int {"Log", "I'm going to return 1.");
    return 1;

I call that function from my game.

function Log(string LogMessage)
    // This gets called from ActionScript, telling me it's going to return 1

function CallActionScript()
    local int Result;
    Result = ActionScriptInt("someFunction");
    // Result is always 0

Has this ever happened to you? Why does this happen? How do you fix it?

OK, I got it working using invoke instead of ActionScriptInt. I don’t like doing that because it’s supposed to be worse for performance. But if this is what I have to do to make it work, I guess that’s what I’ll have to do.