PDA

View Full Version : Why am i getting theese errors?


Jman3ooo
09-07-2002, 01:50 PM
This is from g_main and everytime I try to compile I get theese errors:

2275 C:\Program Files\LucasArts\Star Wars JK II Jedi Outcast\GameData\code\game\g_main.c
subscripted value is neither array nor pointer

2276 C:\Program Files\LucasArts\Star Wars JK II Jedi Outcast\GameData\code\game\g_main.c
[Warning] passing arg 1 of `VectorLength' makes pointer from integer without a cast



void G_RunFrame( int levelTime ) {
int i;
gentity_t *ent;
int msec;
int start, end;
int count;
int radius;
int a;
long distcheck;
float animSpeedScale = 1;

for ( count = 0 ; count < MAX_GENTITIES ; count++ )
{
if (g_entities[count].client && g_entities[count].client->ps.clientNum != ent->client->ps.clientNum)
{

VectorSubtract( ent->client->ps.origin, g_entities[count].client->ps.origin[1], a ); //2275
if (VectorLength(a) < 1000) //2276
{
animSpeedScale = .25;
break;
}
else
{
animSpeedScale = 1;
}
}
}

Jaii der Herr
09-07-2002, 02:32 PM
VectorSubtract( ent->client->ps.origin, g_entities[count].client->ps.origin[1], a );

=>

VectorSubtract( ent->client->ps.origin, g_entities[count].client->ps.origin, a );



int a;

=>

vec3_t a;

Jman3ooo
09-07-2002, 04:59 PM
Wow thx a million