Vector isn`t noticed by SED

Posted By: Bludda

Vector isn`t noticed by SED - 11/07/08 16:50

Hello,

after trying Lite-C and making the tutorial I got Gamestudio 7.

Now I just copied the script of tutorial 19 (the one with the ball) and changed the filename for the level (WED).

The Problem is now, always when I start this "game" there appears a error message:

<VECTOR* ball_speed;>
THEBALL_NOTWORKINGCODE WDL 7:0 (): Keyword unknown VECTOR*

because of that the ball controls don`t work either of course.
It`s the most basic thing of all but I don`t know what could be wrong with this. frown

In the free Lite-C this tutorial worked of course.

Thanks for your help.
Posted By: Quad

Re: Vector isn`t noticed by SED - 11/07/08 17:25

save your file as .c not .wdl
Posted By: Bludda

Re: Vector isn`t noticed by SED - 11/07/08 17:45

Thanks, now this problem is destroyed.

But now another error message expires, about a missing bracket in line 11...I checked it, but this bracket ({) is after function_main () and the other one (}) at the end of the text.
No idea what could be wrong with that again.
Posted By: Quad

Re: Vector isn`t noticed by SED - 11/07/08 21:03

post your script so we can help better.
Posted By: sadsack

Re: Vector isn`t noticed by SED - 11/08/08 00:43

Bludda, the bracket may not be at line 11, go down your code and make sure that you have all the right bracket in the right place.
Posted By: Bludda

Re: Vector isn`t noticed by SED - 11/08/08 10:50

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

///////////////////////////////////////////////////////////////

VECTOR ball_speed;
ENTITY* ball;

function main();
{
fps_max = 140;
level_load("theballworld.wmb"); // load the level
wait (2); // wait until the level is loaded
ball = ent_create ("ball.mdl", vector(-400, 0, 100), NULL); // create the ball
ph_setgravity (vector(0, 0, -386)); // set the gravity
phent_settype (ball, PH_RIGID, PH_SPHERE); // set the physics entity type
phent_setmass (ball, 3, PH_SPHERE); // and its mass
phent_setfriction (ball, 80); // set the friction
phent_setdamping (ball, 40, 40); // set the damping
phent_setelasticity (ball, 50, 20); // set the elasticity
while (1)
{
ball_speed.x = 25 * (key_cur - key_cul); // move the ball using the cursor keys
ball_speed.y = 25 * (key_cuu - key_cud); // 25 sets the x / y movement speeds
ball_speed.z = 0; // no need to move on the vertical axis
phent_addtorqueglobal (ball, ball_speed); // add a torque (an angular force) to the ball
camera.x = ball.x - 300; // keep the camera 300 quants behind the ball
camera.y = ball.y; // using the same y with the ball
camera.z = 1000; // and place it at z = 1000 quants
camera.tilt = -60; // make it look downwards
wait (1);
}
}

After loading it again today I noticed that the error message of the unknown keyword VECTOR is appearing again. tired
Posted By: Quad

Re: Vector isn`t noticed by SED - 11/08/08 11:50

delete ; after funtion main.

again make sure you save it as .c not .wdl
Posted By: Bludda

Re: Vector isn`t noticed by SED - 11/10/08 15:51

Thank you all very much! laugh
© 2023 lite-C Forums