Advertisement

Problem getting the handle from a namespaced function

Started by July 07, 2013 02:34 PM
1 comment, last by Marcus L 11 years, 4 months ago

Hello,
This is my first post on these forums, and I must say I really like the scripting engine so far smile.png

However I have encountered a problem I think no one has reported yet. When I'm taking a function handle of a function in a namespace, I get a compile error. I wrote this quick test code to demonstrate it:


namespace A
{
	void func()
	{
		print("test");
	}
}

funcdef void CALLBACK();

void main()
{
	CALLBACK @callback = @A::func;
	callback();
}


The error message i get from compiling this test is:

Can't implicitly convert from '<null handle>' to 'CALLBACK@&'.

Here I am assuming you would write @A::func to get the handle to the function func in namespace A.

Thanks for your help!
- mxg

Actually, this had already been reported and fixed :)

The fix is in revision 1660.

Regards,

Andreas

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

Advertisement

Oh, okay, I'll download that then smile.png

Thanks for the help!
- mxg

(I changed account since I realized the other was registered to my old email)

This topic is closed to new replies.

Advertisement