@ Aaron Miller -
What I meant is that in Dark Basic(DGK) you could test your dll function. This would make it easier for debugging. I was just suggesting making a tool to convert DGK code to a project with the functions converted to dll functions.
For instance:
int add(int a, int b)
{
// do something
// use db functions
}
to
DLLCMDC int add(int a, int b)
{
// do something
// use db functions
}
It would be nice to setup an environment that would allow you to test and create a dll. The converter was just an idea, so you don't have to create two projects.
I had the idea of using DGK for testing your plugin and your template to create them. I was just trying to find a way to integrate them together into one environment and one project.
Also, I was having another problem with your plugin. I was trying to return a float (from the dll into DB Pro) and it crashed. If I use and int it doesn't.
DB Pro Code:
DC Light Position X(Index)
C++ Plugin Code:
DLLCMDC float DCGetLightPositionX(int Index)
{
StartFunction
Light light = lights->Item(Index);
return light.Position()->GetX();
}
I think there was a way of returning floats using a function you created, but I haven't used it before and I don't know where to look for the documentation.
Thanks,
GFS