Bug in tutorial source code

Started by
1 comment, last by SiCrane 18 years, 3 months ago
There seems to be a bug in lines 122 and 124 of the tutorial source code's main.cpp for both 2.4.1d and 2.5.0WIP2. They relevant source is currently:

	if( r != asEXECUTION_FINISHED )
	{
		// The execution didn't finish as we had planned. Determine why.
		if( asEXECUTION_ABORTED )
			cout << "The script was aborted before it could finish. Probably it timed out." << endl;
		else if( asEXECUTION_EXCEPTION )
		{
It looks like it should be:

	if( r != asEXECUTION_FINISHED )
	{
		// The execution didn't finish as we had planned. Determine why.
		if( r == asEXECUTION_ABORTED )
			cout << "The script was aborted before it could finish. Probably it timed out." << endl;
		else if( r == asEXECUTION_EXCEPTION )
		{
Currently it appears to always executes the asEXECUTION_ABORTED branch even if there was an exception (such as a divide by 0) or something weird happened.
Advertisement
Heh! Silly mistake.

I'll fix it for the next release. Thanks for letting me know.

Does this mean that you checking out my library for a project of yours? [wink]

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

No project. Just checking it out. :)

This topic is closed to new replies.

Advertisement