Lua bind function call (compile fine but getting runtime exception Access violation - no RTTI data!)

chamika deshan <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Hello
I am quite new to lua.
I am trying to bind a oggsound library to lua. Everythings compile fine, but
run time i am getting an error.

This is how I bind classes
----------------------------------------------------------------------------------------------------------------------------------------------

                 // binding OgreOggSoundManager class with overloaded
function createsound
                 luabind::module(myLuaState) [
luabind::class_<OgreOggSoundManager>("OgreOggSoundManager")
 .def("createSound", (OgreOggISound*(OgreOggSoundManager::*)(const
std::string&,const std::string&, bool, bool, bool))
&OgreOggSoundManager::createSound)
 ];

                // binding OgreOggISound class
luabind::module(myLuaState) [
 luabind::class_<OgreOggISound>("OgreOggISound")
];


This is the createsound method in OgreOggSoundManager class
----------------------------------------------------------------------------------------------------------------------------------------------

OgreOggISound* createSound
 (const std::string& name,
   const std::string& file,
   bool stream = false,
   bool loop = false,
   bool preBuffer=false);


This is how I call loadGame1OceanSound function in script
----------------------------------------------------------------------------------------------------------------------------------------------

OgreOggISound game1StateOceanSound = NULL;
luabind::call_function<int>(myLuaState, "loadGame1OceanSound",
OgreOggSoundManager::getSingletonPtr(), game1StateOceanSound);


This is script
----------------------------------------------------------------------------------------------------------------------------------------------

function loadGame1OceanSound(manager, sound)
name = "GAME_1_BACKGROUND_OCEAN_SOUND";
sFile = "SEA.wav";
 sound = manager:createSound(name, sFile, false, true, false);
return 0;
end

What am I doing wrong?

Thank you in advance

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first

_______________________________________________
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.