Hey ho
hab da mal ne frage an die profis
hab das Petsystem eingefügt aber bei dem filesd late er ja die exp aus der exp.txt un jetz das flogende problem
C
- // 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
für pett system in der main.cpp soll ja diese eintrag gemacht werden
C
- #ifdef NEW_PET_SYSTEM
- std::string temp_exp_line;
- 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
nur wen ich das nun einfüge hab ich ein erro
man müsste also diese pet funktion i-wie mit
// START_OF_Player_EXP_TABLE_LOADING
einbinden nur wie ?