Assert thrown calling basic C++ function

"Brian Hughes" <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <003f01ca0fd8$b20476b0$160d6410$@com>
Hello everyone,

 

I'm a new user to both Lua and LuaBind, so I'm hoping I'm just making a
simple mistake in my program! I'm implanting Lua/LuaBind into an existing
codebase.

 

I'm starting by doing a very basic test of calling a global C++ function
from within a lua script. Nothing fancy, however it is throwing an assert
trying to call the function.

 

I do all of the setup (open lua state, open lua libs, open luabind), then
define my function as follows:

 

      luabind::module(gScriptManager->GetState())

      [

            luabind::def("sayhello", &sayhello)

      ];

 

Where sayhello is quite basic:

 

void sayhello(void)

{

      return;

}

 

However, when I try to run a script that only has: sayhello()  in it,
luaL_dofile returns a value of 1 (some error, which is supposedly a YIELD
error?), and when I use Decoda to debug Lua, it is throwing an assert when
it tries to call the function.

 

I'm using Lua 5.1.4 with LuaBind 0.8.1 on MS Visual Studio 2005.

 

I have a GameDev.net thread, but no solution so far:
http://www.gamedev.net/community/forums/topic.asp?topic_id=542683

 

Thanks to anyone who can help!

 

Sincerely,

~Brian "Iced_Eagle" Hughes

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.