mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-19 16:47:14 +02:00
Fix issue with modules not registering their API.
This commit is contained in:
@ -21,7 +21,8 @@ static bool RegisterAPI()
|
||||
return false;
|
||||
}
|
||||
|
||||
RootTable().Bind(_SC("SampleType"), Class< SampleType >(DefaultVM::Get(), _SC("SampleType"))
|
||||
RootTable(DefaultVM::Get()).Bind(_SC("SampleType"),
|
||||
Class< SampleType >(DefaultVM::Get(), _SC("SampleType"))
|
||||
.Ctor()
|
||||
.Ctor< int >()
|
||||
.Var(_SC("MyNum"), &SampleType::mMyNum)
|
||||
@ -29,7 +30,7 @@ static bool RegisterAPI()
|
||||
.Func(_SC("SampleMethod"), &SampleType::SampleMethod)
|
||||
);
|
||||
|
||||
RootTable().Func(_SC("SampleFunction"), &SampleFunction);
|
||||
RootTable(DefaultVM::Get()).Func(_SC("SampleFunction"), &SampleFunction);
|
||||
|
||||
// Registration was successful
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user