Hello all
i'm trying to make my first ever PDK Addon
i started with Simobject even if it is hard cus i need it for an other addon
i made my way through by Copy paste, SDK docs and fixing visual studio Red lines
i finished all the needed declarations and the DLL just compiled
now i need to test it
so i wanted to register some properties to be used in LUA scripts in my objects
and visual studio is not accepting my code even if i copy paste a sample code, it just says that arguments don't match
i read the SDK doc about properties and even used their code : same error :|
here is what i did :
i need this DLL to only create a custom property that gonna be used in some LUA / XML scripts for scenery objects or simobjects
thnx in advance
i'm trying to make my first ever PDK Addon
i started with Simobject even if it is hard cus i need it for an other addon
i made my way through by Copy paste, SDK docs and fixing visual studio Red lines
i finished all the needed declarations and the DLL just compiled
now i need to test it
so i wanted to register some properties to be used in LUA scripts in my objects
and visual studio is not accepting my code even if i copy paste a sample code, it just says that arguments don't match
i read the SDK doc about properties and even used their code : same error :|
here is what i did :
C++:
HRESULT RegisterProperties(__in __notnull ISimObjectManagerV400* pSimObjectMgr)
{
pSimObjectMgr->RegisterProperty(GetClassId(), LPCWSTR("wsup"), LPCWSTR("l"), MyClass::GetMyDoubleProperty);
}
//// the function bellow is inside MyClass
/*static */HRESULT GetMyDoubleProperty(__in const ISimObject& Sim, __out double& dProperty, __in int iIndex)
{
dProperty = static_cast<const MyClass&>(Sim).v;
return S_OK;
}
//and it throws this error :
//Severity Code Description Project File Line Suppression State
//Error (active) E0304 no instance of overloaded function "P3D::ISimObjectManagerV400::RegisterProperty" matches the argument list First attempt %PATH\%C++ projects\First PDK attempt\First PDK attempt\MyClass.cpp 119
i need this DLL to only create a custom property that gonna be used in some LUA / XML scripts for scenery objects or simobjects
thnx in advance