using search in gamestudio manual looking under the word "force" I am looking at the myCrate example bottom below:
However when running even just the line
var gravity[3] = 0,0, -386;

I always get a syntax error
why is this?
Perhaps someone out their can clear this up. Do I need something else at the very top to make this syntex usable?
is this example of force workable by itself.
thanks


/////example////
#include <acknex.h>
#include <default.c>
#include <atypes.h>

entity* myCrate;
var gravity[3] = 0,0, -386;
var crateMass= 10;
phent_settype( myCrate, PH_RIGID, PH_BOX );
phent_setmass( crateMass );
// force is three times as strong as gravity's pull, so we can lift up the entity, while pressing a key
while (key_pressed( key_for_str("L")) )
{
vec_set( temp, gravity );
vec_scale( temp, -3 * crateMass );
phent_addforceglobal( myCrate, nullvector, temp );
wait(1);
}