Pretty simple question, why doesn't my code work? It shows 7 errors, the inkeys and the x,y,z variable.
#include "DarkGDK.h"
#include "DarkPhysics.h"
#include "DarkAI.h"
#include "DarkLights.h"
#include "ShaderData.h"
void DarkGDK ( void ) {
dbSyncOn();
dbPhyStart();
dbSyncRate(60);
dbBackdropOn();
dbAutoCamOff();
dbPositionCamera(0,0,0,-40);
dbMakeObjectSphere(1,20);
dbPositionObject(1, 0, 0, 0);
dbMakeObjectBox(2,1000,1,1000);
dbPositionObject(1,0,-1,0);
dbPhyMakeRigidBodyDynamicSphere(1);
dbPhyMakeRigidBodyStaticBox(2);
while( LoopGDK ( ) ) {
x=dbObjectPositionX(1);
y=dbObjectPositionY(1);
z=dbObjectPositionZ(1);
dbPositionCamera(0,0,-50,0);
dbRotateCamera(0,-90,0,0);
if dbInKey$()="w"; {
dbPhyAddRigidBodyForce(1,0,0,5,2);
}
if dbInKey$()="s"; {
dbPhyAddRigidBodyForce(1,0,0,-5,2);
}
if dbInKey$()="d"; {
dbPhyAddRigidBodyForce(1,5,0,0,2);
}
if dbInKey$()="a"; {
dbPhyAddRigidBodyForce(1,-5,0,0,2);
}
dbPhyUpdate();
dbSync();
}
}
Instead of dbInKey$ does dbKeyState work?? if so how does it, like
if dbKeyState()=37; {
code
}
???
I want coke, not Pepsi!