call_member und boost::ref

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

call_member und boost::ref

Stefan Schwarzbach
Hallo,

as I read in the luabind documentation, I have to warp a variable with  
boost::ref(...), if I want to pass the variable as a reference so the  
lua function can change the value of that variable.
If I do so, I get the following error: "you are trying to use an  
unregistered type".

The following call runs correctly:
luabind::call_member<void>(entity->GetLuaObject(),  
"OnFightCalculateAttack", enemy, mode, attackType, damage);

This call produces the error:
luabind::call_member<void>(entity->GetLuaObject(),  
"OnFightCalculateAttack", enemy, mode, boost::ref(attackType),  
boost::ref(damage));

attackType is of typ int, damage is of type float.

What is wrong?

Thanks in advance,
Stefan Schwarzbach


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user