🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

SetMessageCallback()

Started by
0 comments, last by WitchLord 17 years, 11 months ago
Hello, I have a question about this function. When I use this function like this: SetMessageCallback(asMETHOD(ScriptEngineOutput, messageCallback), &cs.m_msgScreen, asCALL_THISCALL); I will later get a problem because "messageCallback" is declared in "ScriptEngineOutput" and m_msgScreen is not only a "ScriptEngineOutput", but actually inherits from it. Do you know what I mean? What was wrong with the very convenient SetCommonMessageStream() ?
Advertisement
It shouldn't be a problem that m_msgScreen is inherited from ScriptEngineOutput. Both single inheritance and multiple inheritance are supported.

The messageCallback signature is not the same as the previous message stream. Isn't that your problem?

I switched to this new message callback feature, because it is much more flexible than the previous message stream. You can now filter the messages and format them in a much easier manner than if you would have to parse the text message to understand what it meant.

You can look at the samples for an idea on how to get the same old output.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement