Jump to content
  • Advertisement
Sign in to follow this  
SiCrane

Bug in tutorial source code

This topic is 4607 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!