get_engine_interface

Please post any questions about developing your plugin here. Please use the search function before posting!
edcolmar
Junior Member
Posts: 21
Joined: Tue Oct 15, 2013 10:59 pm

get_engine_interface

Postby edcolmar » Mon Feb 03, 2014 10:08 pm

Hey all!

Running the following on the Jan-26-2014 build:

Code: Select all

import engine_c

engine = engine_c.get_engine_interface()


[SP] Caught an Exception:
Traceback (most recent call last):
File '../addons/source-python/packages/source-python/plugins/manager.py', line 64, in __missing__
instance = self.instance(plugin_name, self.base_import)
File '../addons/source-python/packages/source-python/plugins/instance.py', line 73, in __init__
self._plugin = __import__(import_name)
File '../addons/source-python/plugins/leetcoin/leetcoin.py', line 38, in <module>
engine = engine_c.get_engine_interface()

AttributeError: 'module' object has no attribute 'get_engine_interface'

Did this move? Get renamed?
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Mon Feb 03, 2014 10:19 pm

We decided that importing a function whose sole purpose is to retrieve the instance of an interface was unnecessary. So, instead, we now just expose the interface itself as the imported object:

Code: Select all

from engine_c import GameEngine

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 57 guests