Jump to content

Player Exp & Pet Exp


Recommended Posts

Hi

Id like to set up in the Src Player exp and Pet exp over txt

// START_OF_Player_EXP_TABLE_LOADING
	string temp_exp_line;
	char szExpTable[256];
	snprintf(szExpTable, sizeof(szExpTable), "%s/exp.txt", LocaleService_GetBasePath().c_str());
	ifstream exp_table_open(szExpTable);
	if (!exp_table_open.is_open()) {
		fprintf(stderr, "Failed to Load ExpTable from %s/exp.txt\n", LocaleService_GetBasePath().c_str());
		sys_err("Failed to Load ExpTable from %s/exp.txt", LocaleService_GetBasePath().c_str());
		return 0;
	}
	int exp_table_counter = 0;
	while (!exp_table_open.eof())
	{
		exp_table_open >> temp_exp_line;
		str_to_number(exp_table_common[exp_table_counter], temp_exp_line.c_str());
		exp_table_counter++;
	}
	fprintf(stderr, "EXP erfolgreich geladen von: %s\n", LocaleService_GetBasePath().c_str());
	//sys_log(0, "EXP Table Loaded succsefully from %s", LocaleService_GetBasePath().c_str());
	// END_OF_Player_EXP_TABLE_LOADING
	
#ifdef NEW_PET_SYSTEM
 	temp_exp_line = ""; //clearing
	std::ifstream exppet_table_open("/usr/home/game/share/exppettable.txt");
	/*if (!exp_table_open.is_open())
	return 0;*/

	int exppet_table_counter = 0;
	int tmppet_exp = 0;
	while (!exppet_table_open.eof())
	{
		exppet_table_open >> temp_exp_line;
		str_to_number(exppet_table_common[exppet_table_counter], temp_exp_line.c_str());
		if (exppet_table_common[exppet_table_counter] < 2147483647) {
			sys_log(0, "Livelli Pet caricati da exppettable.txt: %d !", exppet_table_common[exppet_table_counter]);
			exppet_table_counter++;
		}
		else {
			fprintf(stderr, "[main] Impossibile caricare la tabella exp valore non valido\n");
			break;
		}
	}
#endif

 

but it doesnt work

the output:

main.cpp: In function 'int main(int, char**)':
main.cpp:550: error: 'string' was not declared in this scope
main.cpp:550: error: expected `;' before 'temp_exp_line'
main.cpp:553: error: 'ifstream' was not declared in this scope
main.cpp:553: error: expected `;' before 'exp_table_open'
main.cpp:554: error: 'exp_table_open' was not declared in this scope
main.cpp:560: error: 'exp_table_open' was not declared in this scope
main.cpp:562: error: 'temp_exp_line' was not declared in this scope
main.cpp:571: error: 'temp_exp_line' was not declared in this scope
gmake: *** [OBJDIR/main.o] Error 1
 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 0

      I just implemented some costumes and they are not visible

    2. 0

      Skill Tree Problem

    3. 97

      Ulthar SF V2 (TMP4 Base)

    4. 5

      Client Crashes through Offline Shop (Ikarus)

    5. 5

      VIVY-WORLD2 - FARM TO THE TOP

    6. 0

      ToolTip Bug?

    7. 0

      Skill tree build erorr

    8. 0

      Visual Bug | How to fix this visual bug inside the Special Storage feature?

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.