Re: [luabind] pass by ref, no matching overload found
Brought to you by:
arvidn,
daniel_wallin
From: Сергей В. <iva...@gm...> - 2015-03-31 22:45:35
|
Thanks. Worked. 2015-04-01 0:41 GMT+03:00 Christian N. <cn...@gm...>: > On 2015-03-31 23:33 +0200, Сергей ВладимировичСергей Владимирович wrote: > > [...] > > > > I want to set tag for node from lua script: > > node = scene:find ( "NewGameButton" ) > > node:setTag ( "scale", value ) > > > > I get luabind error: > > No matching overload found, candidates: > > void setTag(Node&,std::string const&,std::string const&) > > > > But this line works fine > > node:setTag ( "scale", "str_value" ) > > > > How to get setTag working in both cases? > > > > It seems that value is not a string. AFAIR luabind does not implicitly > convert numbers to strings, so you should try > > node:setTag ( "scale", tostring( value ) ) > > where tostring() is a Lua standard library function > (http://www.lua.org/manual/5.1/manual.html#pdf-tostring). > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > luabind-user mailing list > lua...@li... > https://lists.sourceforge.net/lists/listinfo/luabind-user > |