SetMessageCallback broken?

Started by
1 comment, last by chaoslion 15 years, 2 months ago
i think the setmessagecallback method is broken for using class methods.

engine->SetMessageCallback(asMETHOD(maincls,ascb), pointer2maincls, asCALL_THISCALL)
with method

void maincls::ascb(const asSMessageInfo *msg) {..}
im getting no feedback from this callback, if i there´s an error in my script. but setting a non class function as callback does seem to work.. [Edited by - chaoslion on January 19, 2009 1:02:24 PM]
Advertisement
Are you registering it inside of maincls? If you are, just use "this" where you have pointer2maincls. It works for me.
yep inside, and i did use the this pointer.. but it doesnt work?!


EDIT:
ok does work, error was in my log function... ;)

This topic is closed to new replies.

Advertisement