According to the documentation the file and the material id are optional parameters... is that wrong? I tried loading a mesh file at one point in my troubleshooting and got the same error. Will try a material number as well and post results but its kind of an annoying step seeing as how there's already a default material anyway.
Edit:
No good... using all the parameters now and same error. Any other thoughts?
Documentation:
Parameters
int iID
identification number of the 3D object that you want to be represented by a static mesh in the simulation
char* szFile
this parameter is optional and when used the data from the object will be saved out to the specified file, this can be useful for some complex objects as the computational time may be long, this file can later be loaded in much faster using the command phy load rigid body static mesh
int iMaterial
this parameter is optional, a material can be specified if required upon creation of a static rigid body mesh , by specifying a material you can have further control over how the object will react with other objects in regard to properties such as its restitution
My call:
dbPhyMakeMaterial ( 1, "terrain" );
dbPhyBuildMaterial ( 1 );
dbPhyMakeRigidBodyStaticMesh ( 261, "C:\\Users\\User\\Desktop\\Terrain.x", 1 );
And the terrain.x does exist and loads just fine.
Thanks for your help on this one so far. It has been a major thorn in my side.