Really Need Help Score System

06/08/2013 17:06 WooTheFck#1
what is the problem with this code

MoverRender.cpp

Code:
#ifdef __ARENA_SCORE
            //Arena Score
        if( GetWorld()->IsArena() && !strcmp( m_szName , g_ArenaScore.m_vecUserInfo[0].szName) )
        {
                    pTexture = g_Neuz.m_pHeroIconArena;
                    if( pTexture )
                    {
                        long oldpointx=point.x;
                        long oldpointy=point.y;
                        point.y -= pTexture->m_size.cy + 5;
                        point.y = point.y+1;
                        //point.x = point.x + 15;
                        if(pGuild==NULL)
                        {
                            point.x -= cs1.cx + 27;    
                        }
                        else
                        {
                            if( cs1.cx > cs2.cx )
                            {
                                if(this->GetGuild()->m_dwLogo!=NULL)
                                {
                                    point.x -= cs1.cx + 52;    
                                }
                                else
                                {
                                    point.x -= cs1.cx + 27;    
                                }
                            }
                            else
                            {
                                if(this->GetGuild()->m_dwLogo!=NULL)
                                {
                                    point.x -= cs2.cx + 52;    
                                }
                                else
                                {
                                    point.x -= cs2.cx + 27;    
                                }
                            }
                        }

                            pTexture->Render( &g_Neuz.m_2DRender, point );

                        point.x=oldpointx;
                        point.y=oldpointy;
                    }
            }
#endif

Error:
MoverRender.cpp(2260) : error C2059: syntax error : 'if'
MoverRender.cpp(2261) : error C2143: syntax error : missing ';' before '{'
MoverRender.cpp(2261) : error C2447: '{' : missing function header (old-style formal list?)
MoverRender.cpp(2428) : fatal error C1004: unexpected end of file found
06/08/2013 18:18 raventh1984#2
Try this one

PHP Code:
#ifdef __ARENA_SCORE
            //Arena Score
        
if( g_ArenaScore.m_vecUserInfo.size() ) 
            if( 
GetWorld()->IsArena() && !strcmpm_szName g_ArenaScore.m_vecUserInfo[0].szName) )
            {
                    
pTexture g_Neuz.m_pHeroIconArena;
                    if( 
pTexture )
                    {
                        
long oldpointx=point.x;
                        
long oldpointy=point.y;
                        
point.-= pTexture->m_size.cy 5;
                        
point.point.y+1;
                        
//point.x = point.x + 15;
                        
if(pGuild==NULL)
                        {
                            
point.-= cs1.cx 27;    
                        }
                        else
                        {
                            if( 
cs1.cx cs2.cx )
                            {
                                if(
this->GetGuild()->m_dwLogo!=NULL)
                                {
                                    
point.-= cs1.cx 52;    
                                }
                                else
                                {
                                    
point.-= cs1.cx 27;    
                                }
                            }
                            else
                            {
                                if(
this->GetGuild()->m_dwLogo!=NULL)
                                {
                                    
point.-= cs2.cx 52;    
                                }
                                else
                                {
                                    
point.-= cs2.cx 27;    
                                }
                            }
                        }

                            
pTexture->Render( &g_Neuz.m_2DRenderpoint );

                        
point.x=oldpointx;
                        
point.y=oldpointy;
                    }
            }
#endif 
06/08/2013 18:29 WooTheFck#3
same error i got sir

MoverRender.cpp(2335) : error C2059: syntax error : 'if'
MoverRender.cpp(2337) : error C2143: syntax error : missing ';' before '{'
MoverRender.cpp(2337) : error C2447: '{' : missing function header (old-style formal list?)
06/08/2013 18:32 İross#4
afaik:

after
Code:
if( g_ArenaScore.m_vecUserInfo.size() )
the "{" is missing.

Add in the line a { and above the
Code:
#endif
add an }
06/08/2013 18:33 Jopsi332#5
can u post line 2235 ?
06/08/2013 18:33 raventh1984#6
What do you have above the #ifdef __ARENA_SCORE

Quote:
Originally Posted by İross View Post
afaik:

after
Code:
if( g_ArenaScore.m_vecUserInfo.size() )
the "{" is missing.

Add in the line a { and above the
Code:
#endif
add an }

Nope i have the same setup and mine is function correctly.

So he must have something else instead.
06/08/2013 18:36 İross#7
@raventh ah okay ;)
(I know it only from PHP ..^^)

@Jopsi Du meinst wohl Zeile 2335 :D
06/08/2013 18:39 WooTheFck#8
@jopsi here the 2235 line

CRect rect( point.x - 2, point.y - 2, point.x + nGaugeWidth + 2, point.y + 5 + 2);

this the 2335
if( g_ArenaScore.m_vecUserInfo.size() )
06/08/2013 18:45 raventh1984#9
Ill bet he has it missed placed in the file

I have it after this

PHP Code:
CTexturepTexture;
        
CString strPath;
        
CSize cs1 pFont->GetTextExtentszName );
        
CSize cs2;
        
        if(
pGuild != NULL)
        {
            
cs2 pFont->GetTextExtentpGuild->m_szGuild );

            if( 
cs1.cx cs2.cx )
                
point.+= cs1.cx 2;
            else
                
point.+= cs2.cx 2;
        }
        else
            
point.+= cs1.cx 2
Then
PHP Code:
#ifdef __ARENA_SCORE
            //Arena Score
        
if( g_ArenaScore.m_vecUserInfo.size() ) 
            if( 
GetWorld()->IsArena() && !strcmpm_szName g_ArenaScore.m_vecUserInfo[0].szName) ) 
Etc.
06/08/2013 18:52 WooTheFck#10
@ sir Raventh

ross is correct i miss { } i success to rebuild the neuz but i dont think if my server will be crash
06/08/2013 19:14 raventh1984#11
Its an bit strange tough cause i use that what i did give you and i dont have problems with it.

So that means that you placed it at an different section then me.

But good that its solved.
06/08/2013 19:24 WooTheFck#12
but i use the code that you're gave to me and the place the code that you are say to me and no error comes,

the only problem that i've got on my worldserver :


i think same as you said --wrong place