Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / How to register functions for Barnski Lua??

Author
Message
marlou
15
Years of Service
User Offline
Joined: 17th Jan 2009
Location:
Posted: 13th Sep 2009 13:07
How to register function for Barnski's Lua??




LuaFile "filename.lua"


Error:
run time error=lua::register_user_function((DWORD)print,"print","",0,0);

When a person has nothing but a dream, can he dare to dream.
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 13th Sep 2009 13:48
You need to register a pointer to the function... have a look at "Pointer Functions" in your cpp reference guide or google the term.

http://www.codesampler.com/dx9src.htm

Bottom of the page :
http://www.cplusplus.com/doc/tutorial/pointers/

All about function pointers, callback and functors
http://www.newty.de/fpt/index.html

If it ain't broke.... DONT FIX IT !!!

Login to post a reply

Server time is: 2024-11-20 15:20:55
Your offset time is: 2024-11-20 15:20:55