🎉 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!
Issues with SetLineCallback
Has anyone had any issues using line callbacks in release mode?
I'm assuming the correct way to emulate ExecuteNext() is by having a line callback such as the following:
void LineCallback(asIScriptContext *pContext)
{
pContext->Suspend();
}
This works fine in a debug build, but seems to fall over in release mode. It appears that the whole script is getting executed in release mode instead of just a single line.
Any thoughts?
Regards,
Wumpee.
It works fine for me.
Similar code to this:
Similar code to this:
void ASLineCallback(void *nothing){ while(ScriptPlayInfo.PauseScript && !ScriptPlayInfo.Stop) Sleep(10); if(ScriptPlayInfo.Stop) { TerminateThread(VariableThread, 0); ScriptPlayInfo.AngelScriptContext->Abort(); } return;}
Verify that the library isn't built with the preprocessor flag BUILD_WITHOUT_LINE_CUES set in release mode (check project settings). If this flag is set then the line callback is only called once per loop, instead of for each statement.
It turns out that it was building with BUILD_WITHOUT_LINE_CUES set in release mode. I don't remember changing anything, so maybe AS 2.1.0 Wip 6 was released with this set.
Awesome work by the way =)
Regards,
Wumpee.
Awesome work by the way =)
Regards,
Wumpee.
Yes, I released the library with this flag set by default. This was an error, and future versions should be corrected.
I'm happy that you like my work :D
I'm happy that you like my work :D
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement