View Single Post
psychonic

BAFFLED
Join Date: May 2008
Old 10-17-2016 , 08:37   Re: IScriptVM->LookupFunction() always returns NULL
Reply With Quote #8

I dug into this a bit more for the sake of curiosity.

The LookupFunction implementation in the squirrel VM calls the more generic LookupObject (not exposed on the interface) to get the function by name, but then checks sq_isclosure. Since Squirrel differentiates between closures and native closures, the script functions implemented in C++ don't pass that check, only functions written in Squirrel.

Edit: It looks like GetValue should work for getting at functions.

Last edited by psychonic; 10-17-2016 at 08:41.
psychonic is offline