Jump to content

Home

cg_draw error


Darth_Kitty

Recommended Posts

I am haing trouble with my cg file. This is what I put

 

		//darth
//
// ammo in gun
//

value = ps->stats[sTAT_AMMO];
if (value > 0 ) {
//First Draw the 3D Model of the Weapon
angles[YAW] = ( cg.time & 2047 ) * 360 / 2048.0;
origin[0] = 80;
origin[1] = 0;
origin[2] = 0;
CG_Draw3DModel( CHAR_WIDTH*3 + TEXT_ICON_SPACE, 360, 96,
	96, cg_weapons[ cent->currentState.weapon ].weaponModel,
	0, origin, angles );

//Draw the Text
trap_R_SetColor( colors[0] );
CG_DrawField (0, 384, 3, value);
trap_R_SetColor( NULL );

// if we didn't draw a 3D icon, draw a 2D icon for weapon
if ( !cg_draw3dIcons.integer && cg_drawIcons.integer ) {
	CG_DrawPic( CHAR_WIDTH*3 + TEXT_ICON_SPACE, 384, ICON_SIZE, ICON_SIZE,
		cg_weapons[ cg.predictedPlayerState.weapon ].weaponIcon );
}
}

 

and when I compile I get this as the errors (saying theres 15 so I belive these are them)

 

c:\documents and settings\sean\desktop\jka_mp_sdk_universal\codemp\cgame\cg_draw.c(2774) : error C2065: 'ps' : undeclared identifier
c:\documents and settings\sean\desktop\jka_mp_sdk_universal\codemp\cgame\cg_draw.c(2774) : error C2223: left of '->stats' must point to struct/union
c:\documents and settings\sean\desktop\jka_mp_sdk_universal\codemp\cgame\cg_draw.c(2777) : error C2065: 'angles' : undeclared identifier
c:\documents and settings\sean\desktop\jka_mp_sdk_universal\codemp\cgame\cg_draw.c(2777) : error C2109: subscript requires array or pointer type
c:\documents and settings\sean\desktop\jka_mp_sdk_universal\codemp\cgame\cg_draw.c(2777) : error C2106: '=' : left operand must be l-value
c:\documents and settings\sean\desktop\jka_mp_sdk_universal\codemp\cgame\cg_draw.c(2778) : error C2065: 'origin' : undeclared identifier
c:\documents and settings\sean\desktop\jka_mp_sdk_universal\codemp\cgame\cg_draw.c(2778) : error C2109: subscript requires array or pointer type
c:\documents and settings\sean\desktop\jka_mp_sdk_universal\codemp\cgame\cg_draw.c(2778) : error C2106: '=' : left operand must be l-value
c:\documents and settings\sean\desktop\jka_mp_sdk_universal\codemp\cgame\cg_draw.c(2779) : error C2109: subscript requires array or pointer type
c:\documents and settings\sean\desktop\jka_mp_sdk_universal\codemp\cgame\cg_draw.c(2779) : error C2106: '=' : left operand must be l-value
c:\documents and settings\sean\desktop\jka_mp_sdk_universal\codemp\cgame\cg_draw.c(2780) : error C2109: subscript requires array or pointer type
c:\documents and settings\sean\desktop\jka_mp_sdk_universal\codemp\cgame\cg_draw.c(2780) : error C2106: '=' : left operand must be l-value
c:\documents and settings\sean\desktop\jka_mp_sdk_universal\codemp\cgame\cg_draw.c(2782) : error C2065: 'cent' : undeclared identifier
c:\documents and settings\sean\desktop\jka_mp_sdk_universal\codemp\cgame\cg_draw.c(2782) : error C2223: left of '->currentState' must point to struct/union
c:\documents and settings\sean\desktop\jka_mp_sdk_universal\codemp\cgame\cg_draw.c(2782) : fatal error C1903: unable to recover from previous error(s); stopping compilation

 

I would also like to point out that I did define Stat_Ammo in bg_local as well as whereever else I thought it was needed. Any ideas?

 

Thanks

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...