🎉 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!

Register interface methods problem :(

Started by
1 comment, last by zopenge 16 years, 2 months ago
I use RegisterInterfaceMethod() to register an class interface But it's parameter type is defined in the header file. I had built it for the module( use NULL parameter to build( ), and AddScriptSection( ) use NULL parameter ) ST] System function (1, 47) : ERR : Identifier 'CharacterAttribute' is not a data type [ST] System function (1, 65) : ERR : Object handle is not supported for this type [ST] System function (1, 75) : ERR : Identifier 'CharacterAttribute' is not a data type [ST] System function (1, 93) : ERR : Object handle is not supported for this type But it still told me the class is unidntified. How can I avoid this problem ? Sorry, My english is poor, Thanks for help ~~:_)
Advertisement
Building a module with module name NULL just means that the module doesn't have any name, it's still just a script module.

The interface registered from the engine can only use types as parameters that the engine knows about, i.e. not types declared in scripts. If you want to register an interface method that takes a CharacterAttribute as a parameter you must also register the CharacterAttribute in the application.

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

Thanks, I want to use CharacterAttribute as an interface~~

This topic is closed to new replies.

Advertisement