lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hmmm I remember seeing this same question at, am I correct?

I guess you'll have to post extra code snippets for us to help you.

1. How are you registering the function?
2. How are you calling the function (in your script)?

Returning 1 at the end of the C function is OK as long as the function receives arguments in the stack. It'll return the top stack element as the result.

And btw, since you're programming in C++, prefer static_cast<DWORD>( lua_tonumer() ) over the c-style (DWORD)lua_tonumber() cast.

+Thiago Bastos

------------ Reply Separator  ------------

On 27/12/2002 at 12:14 Rob R wrote:

>No.. thats not the problem.
>The rest of my functions do that without a hitch.
>I forgot to mention before, but the function is called withing a script 
>function, so the script is dying before the function is called. It's like
>doesn't like it even present in the script no matter where it is.
>So I guess it might not be getting registered..
>I'll see
>Add photos to your e-mail with MSN 8. Get 3 months FREE*.