When I press 'O' the input thing comes up, and I enter the ID number, and then I get an access violation pointing to dbLoadObject.
Know what this could be from?
#include "DarkSDK.h"
// VARIABLES
bool bAppLoop = true;
LPSTR ObjectPathLib[256];
LPSTR ObjectLib[256];
char *cID;
int iObjectCount = 0;
void DarkSDK (void)
{
// OPEN CFG FILE
dbOpenToRead(1,"path.cfg");
// READ AND SET CFG FILE CONTENTS
for( int x = 0; x <= 256; x++)
{
if(dbFileEnd(1) == 0)
{
ObjectPathLib[x]=dbReadString(1);
dbPrintC("Loading object ");
dbPrint(ObjectPathLib[x]);
dbSync();
}
x++;
}
while(bAppLoop == true)
{
if(dbEscapeKey()==1)
{
bAppLoop = false;
}
if(dbKeyState(24) == 1)
{
dbCLS();
dbPrintC("Please Enter Object ID Number: ");
cID = dbInput();
dbLoadObject(ObjectPathLib[(INT)cID],iObjectCount);
iObjectCount++;
}
}
}
5/14/06- 1427 lines into my 3D game engine! Player Movement and File System completed. Working on weapon inventory and player classes.