Day Night Problem

06/27/2013 18:07 WooTheFck#1
Hello i have a problem for da night system, this code is release from r A g e Z o N e

I got this error :
Code:
WndOption.cpp(290) : error C2065: 'pWndDayNight' : undeclared identifier
WndOption.cpp(290) : error C2227: left of '->GetCheck' must point to class/struct/union
        type is ''unknown-type''
WndOption.cpp(1282) : error C2227: left of '->GetCheck' must point to class/struct/union
        type is ''unknown-type''
WndOption.cpp(1282) : error C3861: 'pWndDayNight': identifier not found, even with argument-dependent lookup
I follow this guide

WndOption.cpp


After:
Code:
	pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_CHECK4 );
	if(pWndButton[ 0 ])
	pWndButton[ 0 ]->SetCheck( g_Option.m_bCameraLock );
Add the following Below:
Code:
#ifdef __OPTIONAL_DAYNIGHT
	CWndButton* pWndDayNight = (CWndButton*)GetDlgItem( WIDC_CHECKDAYNIGHT );		
	pWndDayNight->SetCheck( g_Option.m_bDayNight );
#endif // __OPTIONAL_DAYNIGHT

After this:
Code:
	case WIDC_CHECK4:
		{
			if( pWndCamearaLock->GetCheck() )
				g_Option.m_bCameraLock = TRUE;
			else
				g_Option.m_bCameraLock = FALSE;			
		}
		break;

Add the Following:

Code:
#ifdef __OPTIONAL_DAYNIGHT
	case WIDC_CHECKDAYNIGHT:
		{
			if( pWndDayNight->GetCheck() )
				g_Option.m_bDayNight = TRUE;
			else
				g_Option.m_bDayNight = FALSE;			
		}
		break;
#endif // __OPTIONAL_DAYNIGHT
After the Following:

[code]

if(g_pPlayer && g_pPlayer->IsOptionRenderMask() != g_Option.m_bViewMask)
g_DPlay.SendOptionEnableRenderMask( g_Option.m_bViewMask );
pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_CHECK5 );
if(pWndButton[ 0 ])
pWndButton[ 0 ]->SetCheck( g_Option.m_bCameraLock );
[code]


Add the Following:

Code:
#ifdef __OPTIONAL_DAYNIGHT
	pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_CHECKDAYNIGHT );
	if(pWndButton[ 0 ])
		pWndButton[ 0 ]->SetCheck( g_Option.m_bDayNight );
#endif // __OPTIONAL_DAYNIGHT

After the following:

Code:
	case WIDC_VIEWMASK:
		pWndButton = (CWndButton*)GetDlgItem( WIDC_VIEWMASK );
		g_Option.m_bViewMask = pWndButton->GetCheck();
		g_DPlay.SendOptionEnableRenderMask( pWndButton->GetCheck() );
		break;
	case WIDC_CHECK5:
		{
			if( pWndCamearaLock->GetCheck() )
				g_Option.m_bCameraLock = TRUE;
			else
				g_Option.m_bCameraLock = FALSE;			
		}
		break;
Add this:

Code:
#ifdef __OPTIONAL_DAYNIGHT
	case WIDC_CHECKDAYNIGHT:
		{
			if( pWndDayNight->GetCheck() )
				g_Option.m_bDayNight = TRUE;
			else
				g_Option.m_bDayNight = FALSE;		

			g_WndMng.OpenMessageBox( "You Need to Relog or Restart Flyff for this to take effect.", MB_OK, this );
		}
		break;
#endif // __OPTIONAL_DAYNIGHT

i thought that there's a missing code