Jump to content
  • Advertisement
Sign in to follow this  

Bug Fix

This topic is 4261 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

Bug with register methods Problem with registering functions as 'void func(void)'. AngelScript seems to treat this as a function with one parameter, thus not resolving calls to this function. I fixed this bug, I'm not sure if it's the way you'd do it, but this now works properly. Starting at line 593:
                if( type.GetTokenType() != ttVoid )
                    // Store the parameter type

                    if( autoHandle && (!type.IsObjectHandle() || type.IsReference()) )
                            return asINVALID_DECLARATION;			

                    if( paramAutoHandles ) paramAutoHandles->PushLast(autoHandle);
		// Move to next parameter
		n = n->next->next;
		if( n && n->nodeType == snIdentifier )
			n = n->next;

I've only been looking through your code for about 30 minutes, so I'm not sure if this will break other things down the line. Jeremy

Share this post

Link to post
Share on other sites
Also I'm assuming this bug would be in other places such as registering class methods. So obviously there has to be a better place to do this (assuming in the parser). But since I don't have a very good knowledge of your code, I'm having trouble finding where this should actually be fixed at.

Share this post

Link to post
Share on other sites
Thanks for the fix. It looks to be correct.

I'll verify if this needs to be added to other places as well.


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!