Darth_Kitty Posted October 25, 2005 Share Posted October 25, 2005 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 More sharing options...
razorace Posted October 25, 2005 Share Posted October 25, 2005 looks like ps isn't defined in that area of the code. Link to comment Share on other sites More sharing options...
GangsterAngel Posted October 25, 2005 Share Posted October 25, 2005 im not too sure about how to get client values from the server either BTW. Link to comment Share on other sites More sharing options...
razorace Posted October 25, 2005 Share Posted October 25, 2005 guessing here (I'm not allowing myself to play with the code until my homework is all done), but I think it's cg.snap->ps. Link to comment Share on other sites More sharing options...
ensiform Posted October 26, 2005 Share Posted October 26, 2005 hmm in drawstatusbar (where he's most likely doing it because thats where it normally is done) has other ps-> uses... but isnt it teh cg_newDraw you want? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.