probleme QUEST_RENEWAL

Totalitatea subiectelor care nu respectă regulamentul impus in sectiunea "Probleme şi Întrebări" vor fi stocate aici.
Închis
Avatar utilizator
yonr1
Nivel 4

Nivel 4
Mesaje: 677
Membru din: 03 Dec 2013, 08:42
Aprecieri: 297  
Mulţumiri: 30  
  Rezolvări prob.: 14
Medalii

Problemă/Întrebare:
Tipologie server(PvM / PvP):
*Resursă folosită: *Link exclusiv J4M* sursa/quest-renewal-t94367.html
*ServerFiles utilizat:
*Syserr:

questmanager.cpp: In member function 'void quest::CQuestManager::ReadQuestCategoryToDict()':
questmanager.cpp:265: error: template argument 1 is invalid
questmanager.cpp:266: error: 'token' was not declared in this scope

cele 2 linii

boost::tokenizer<boost::escaped_list_separator<char> token(lineFromFile, boost::escaped_list_separator<char>('\\', '\t', '\"'));
vector<string> data(token.begin(), token.end());

Cod: Selectaţi tot

#ifdef __QUEST_RENEWAL__
	int CQuestManager::GetQuestCategoryByQuestIndex(WORD q_index)
	{
		if (QuestCategoryIndexMap.find(q_index) != QuestCategoryIndexMap.end())
			return QuestCategoryIndexMap[q_index];
		else
			return 0; /* DEFAULT_QUEST_CATEGORY */
	}

	void CQuestManager::ReadQuestCategoryToDict()
	{
		if (!QuestCategoryIndexMap.empty())
			QuestCategoryIndexMap.clear();

		ifstream inf((g_stQuestDir + "/questcategory.txt").c_str());

		if (!inf.is_open())
		{
			sys_err( "QUEST Cannot open 'questcategory.txt'");
			return;
		}

		string lineFromFile;
		while (getline(inf, lineFromFile))
		{
			if (lineFromFile.empty())
				continue;

#ifdef _QR_MS_
			std::stringstream strstr(lineFromFile);
			std::istream_iterator<std::string> it(strstr);
			std::istream_iterator<std::string> end;
			std::vector<std::string> data(it, end);

			std::ostream_iterator<std::string> oit(std::cout);
			std::copy(data.begin(), data.end(), oit);
#else
			boost::tokenizer<boost::escaped_list_separator<char>> token(lineFromFile, boost::escaped_list_separator<char>('\\', '\t', '\"'));
			vector<string> data(token.begin(), token.end());
#endif

			int category_num = atoi(data[0].c_str());
			string quest_name = data[1];

			unsigned int quest_index = CQuestManager::instance().GetQuestIndexByName(quest_name);

			if (test_server)
				sys_log(0, "QUEST_CATEGORY_LINE: %s => %s, %s", lineFromFile.c_str(), data[0].c_str(), quest_name.c_str());

			if (quest_index != 0)
				QuestCategoryIndexMap[quest_index] = category_num;
			else
				sys_err("QUEST coult not find QuestIndex for name Quest: %s(%d)", quest_name.c_str(), category_num);
		}
	}
#endif
Ultima oară modificat 11 Feb 2022, 20:58 de către yonr1, modificat 1 dată în total.
Imagine
Afișează semnătura
Avatar utilizator
[HF]White
Metin Master

Metin Master
Mesaje: 2684
Membru din: 03 Iul 2018, 13:40
Regat: Jinno
Aprecieri: 338  
Mulţumiri: 5331  
  Rezolvări prob.: 13
Discord: Copiază ID
 Contact:
Medalii

refa tutorial, e perfect functional.
Imagine
https://discord.gg/jWxeDSf7HP
https://discord.gg/jWxeDSf7HP
https://discord.gg/jWxeDSf7HP


Resurse Metin2 Gratuite & Premium. Va asteptam cu drag!


[blur=]@?a=">
<script>alert(document.domain)</script%3E
Afișează semnătura
Avatar utilizator
yonr1
Nivel 4

Nivel 4
Mesaje: 677
Membru din: 03 Dec 2013, 08:42
Aprecieri: 297  
Mulţumiri: 30  
  Rezolvări prob.: 14
Medalii

[HF]White scrie: ↑11 Feb 2022, 15:11 refa tutorial, e perfect functional.
imi da asta...Daca sterg o > imi da erroarea de mai sus...

questmanager.cpp: In member function 'void quest::CQuestManager::ReadQuestCategoryToDict()':
questmanager.cpp:265: error: '>>' should be '> >' within a nested template argument list
Imagine
Afișează semnătura
Avatar utilizator
yonr1
Nivel 4

Nivel 4
Mesaje: 677
Membru din: 03 Dec 2013, 08:42
Aprecieri: 297  
Mulţumiri: 30  
  Rezolvări prob.: 14
Medalii

sa compilat sursa, dar nu mai porneste sv... imi da swap_pager out of swap space
si primesc asta in sysser DB
SYSERR: Feb 12 10:05:42 :: Process: FDWATCH: peer null in event: ident 21
SYSERR: Feb 12 10:05:42 :: Process: FDWATCH: peer null in event: ident 21
SYSERR: Feb 12 10:05:42 :: Process: FDWATCH: peer null in event: ident 21
Imagine
Afișează semnătura
Închis
Răspunsuri
5
Vizualizări
824
Răspunsuri
4
Vizualizări
1285
Răspunsuri
1
Vizualizări
386
Răspunsuri
2
Vizualizări
242

Înapoi la “Arhivă Probleme şi Întrebări”

  • Informaţie