lfnetwork.com mark read register faq members calendar

Thread: cg_draw error
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 10-24-2005, 10:10 PM   #1
Darth_Kitty
 
Darth_Kitty's Avatar
 
Join Date: May 2002
Location: California
Posts: 471
cg_draw error

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

Code:
		//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)

Code:
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


Change sides? I don't recall saying I was on your's.

Solid Snake
Model Pack Creator
Darth_Kitty is offline   you may: quote & reply,
Old 10-25-2005, 05:46 PM   #2
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
looks like ps isn't defined in that area of the code.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 10-25-2005, 06:31 PM   #3
GangsterAngel
Rookie
 
GangsterAngel's Avatar
 
Join Date: May 2004
Posts: 139
im not too sure about how to get client values from the server either BTW.


GangsterAngel is offline   you may: quote & reply,
Old 10-25-2005, 06:54 PM   #4
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
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.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 10-25-2005, 08:28 PM   #5
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
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?


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Coding > cg_draw error

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:56 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.