Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 16:40

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Problem load (source)

Discussion on Problem load (source) within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2012
Posts: 108
Received Thanks: 29
Problem load (source)

Hello all,

I have problem with load file.

Code:
BOOL CProject::LoadScriptPremium( LPCTSTR lpszFileName )
{
	CScript scanner;
	if( scanner.Load( lpszFileName, FALSE ) == FALSE )
	{
		Error( "%s not found", lpszFileName );
		return FALSE;
	}
	while( scanner.tok != FINISHED )
	{
		if( scanner.Token == _T( "COLOR_PREMIUM" ) )
		{
			m_Premium.dwColorPremium = scanner.GetNumber();
		}
		else if ( scanner.Token == _T( "GOLD_PREMIUM" ) )
		{
			m_Premium.mGoldPremium = scanner.GetNumber();
		}
		else if (scanner.Token == _T( "EXP_PREMIUM" ) )
		{
			m_Premium.mExpPremium = scanner.GetNumber();
		}
		else if (scanner.Token == _T( "DROP_PREMIUM" ) )
		{
			m_Premium.mDropPremium = scanner.GetNumber();
		}
		scanner.GetToken();
	}
        Error("test 1");
	return TRUE;
	Error("test 2");
}
The wordserver and Neuz , generates the error test 1 but not test 2, there's a reading problem and I do not see my error: s, So as there's a problem reading my Neuz not want to connect.


Thank you for helping me

Krust
SourceShop is offline  
Old 02/04/2014, 03:44   #2
 
elite*gold: 294
Join Date: Jun 2009
Posts: 407
Received Thanks: 587
After looking at some other functions, try making the scanner GetToken before the while.

Code:
BOOL CProject::LoadScriptPremium( LPCTSTR lpszFileName )
{
	CScript scanner;
	if( scanner.Load( lpszFileName, FALSE ) == FALSE )
	{
		Error( "%s not found", lpszFileName );
		return FALSE;
	}

	scanner.GetToken();
	while( scanner.tok != FINISHED )
	{
		if( scanner.Token == _T( "COLOR_PREMIUM" ) )
		{
			m_Premium.dwColorPremium = scanner.GetNumber();
		}
		else if ( scanner.Token == _T( "GOLD_PREMIUM" ) )
		{
			m_Premium.mGoldPremium = scanner.GetNumber();
		}
		else if (scanner.Token == _T( "EXP_PREMIUM" ) )
		{
			m_Premium.mExpPremium = scanner.GetNumber();
		}
		else if (scanner.Token == _T( "DROP_PREMIUM" ) )
		{
			m_Premium.mDropPremium = scanner.GetNumber();
		}
	}
	return TRUE;
}
Avalion is offline  
Old 02/04/2014, 14:45   #3
 
elite*gold: 0
Join Date: Oct 2012
Posts: 108
Received Thanks: 29
Thanks you but don't work, worldserver not does not start ;s
My .inc:
Code:
COLOR_PREMIUM 0xffffffff
GOLD_PREMIUM 2
EXP_PREMIUM 2
DROP_PREMIUM 2
I have test your test , and othoer solution but doesn't work, I have test :

Code:
BOOL CProject::LoadScriptPremium( LPCTSTR lpszFileName )
{
	CScript scanner;
	if( scanner.Load( lpszFileName, FALSE ) == FALSE )
	{
		Error( "%s not found", lpszFileName );
		return FALSE;
	}
	scanner.GetToken();
	while( scanner.tok != FINISHED )
	{
		if( scanner.Token == _T( "COLOR_PREMIUM" ) )
		{
			m_Premium.dwColorPremium = scanner.GetNumber();
		}
		else if ( scanner.Token == _T( "GOLD_PREMIUM" ) )
		{
			m_Premium.mGoldPremium = scanner.GetNumber();
		}
		else if (scanner.Token == _T( "EXP_PREMIUM" ) )
		{
			m_Premium.mExpPremium = scanner.GetNumber();
		}
		else if (scanner.Token == _T( "DROP_PREMIUM" ) )
		{
			m_Premium.mDropPremium = scanner.GetNumber();
		}
		scanner.GetToken();
	}
        Error("test 1");
	return TRUE;
	Error("test 2");
}
SourceShop is offline  
Old 02/04/2014, 15:11   #4
 
elite*gold: 4
Join Date: Mar 2010
Posts: 3,148
Received Thanks: 1,535
error test 2 can't be generate because your return before??

for hex use GetToken();
Jopsi332 is offline  
Thanks
1 User
Old 02/04/2014, 15:30   #5
 
elite*gold: 0
Join Date: Oct 2012
Posts: 108
Received Thanks: 29
Okey thanks , so this is what code is good now? (because Neuz not want to connect, and WorldServer generates the error: OnJoin)


EDIT: Work
SourceShop is offline  
Reply


Similar Threads Similar Threads
[Problem]Can't Load Questlib.lua
11/25/2013 - Metin2 Private Server - 0 Replies
Hi.. Today I got a dedicated server, installed all necessary stuff for it, but after starting the server I can't login in to the client, it says that the password is wrong, but when I put the right password, gives me an error saying that isn't possible to connect.. I checked syserr and found this: SYSERR: Nov 25 01:52:27 :: InitializeLua: LOAD_QUESTLIB_FAILURE(locale/germany/quest/questli b.lua) I really need to fix this... I'm using 2013 Serverfiles.
Problem mit Save und Load
05/11/2013 - C/C++ - 7 Replies
Hey ich weiß des ist jetzt Echt Peinlich :handsdown: ich hab ein Vollfunktionierenden Hack hinbekommen mit Menü und Chams und teils anderen Kleinigkeiten aber des einzige was ich net hinbekomme ist so ein Verdammter Teleport-hack. Was ich Meine: USER klickt Save, Bewegt den Spieler, klickt Load und Tada er ist an der vorher gespeicherten Position^^ Habe meine drei Values bzw. Addressen. Die sache ist so: um X, y, oder Z rauszubekommen muss ich das hier rechnen: Playerpointer +...
[5165] When i debug source wont load due to something in the npc.cs HELP ME
01/13/2012 - CO2 Private Server - 2 Replies
I was putting in npcs in my server all was good until i put in a few final npcs and then i had a problem. I dont know if i delete something or what but it says this. Input string was not in a correct format.Format exception was unhandled EntityID = uint.Parse(Info); is where it seems to be wrong at. If someone could please teamviewer with me to figure what i did that would be great. Please just PM me if you want to.
[Source] How to Add new Load Pics.
05/16/2011 - Flyff Private Server - 3 Replies
So, heute zeige ich euch wie man neue Lade Pictures Addet, wenn man die World ändert. Ihr kennt die Pics alles, mann geht in sein Guild House dann kommt das so ein schöner Lade Bildschirm mit einem Guild House drauf ._. Nun zeige ich euch, wie ihr diese ändert / neue eigene addet. Als erstes öffnet ihr in der Neuz die datei DPClient.cpp is in der Solution "Neuz" und da im ordner "Source Files" Relativ weit oben. Dort geht ihr in zeile 2279 dort müsstet ihr das finden:



All times are GMT +1. The time now is 16:41.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.