Jump to content

Recommended Posts

Hello community,

Today I have encountered a problem with my server and I would like to ask you about the solution.

Problem:
In the game, if you press the ESC key quickly while any Quest window is open, the server side prints the following SysErr;

SYSERR: Feb 6 02:17:45 :: Select: wrong QUEST_SELECT request! : 10002

	void CQuestManager::Select(unsigned int pc, unsigned int selection)
	{
		PC* pPC;

		if ((pPC = GetPC(pc)) && pPC->IsRunning() && pPC->GetRunningQuestState()->suspend_state==SUSPEND_STATE_SELECT)
		{
			pPC->SetSendDoneFlag();

			if (!pPC->GetRunningQuestState()->chat_scripts.empty())
			{
				// 채팅 이벤트인 경우
				// 현재 퀘스트는 어느 퀘스트를 실행할 것인가를 고르는 퀘스트 이므로
				// 끝내고 선택된 퀘스트를 실행한다.
				QuestState& old_qs = *pPC->GetRunningQuestState();
				CloseState(old_qs);

				if (selection >= pPC->GetRunningQuestState()->chat_scripts.size())
				{
					pPC->SetSendDoneFlag();
					GotoEndState(old_qs);
					pPC->EndRunning();
				}
				else
				{
					AArgScript* pas = pPC->GetRunningQuestState()->chat_scripts[selection];
					ExecuteQuestScript(*pPC, pas->quest_index, pas->state_index, pas->script.GetCode(), pas->script.GetSize());
				}
			}
			else
			{
				// on default 
				pPC->GetRunningQuestState()->args=1;
				lua_pushnumber(pPC->GetRunningQuestState()->co,selection+1);

				if (!RunState(*pPC->GetRunningQuestState()))
				{
					CloseState(*pPC->GetRunningQuestState());
					pPC->EndRunning();
				}
			}
		}
		else
		{
			sys_err("wrong QUEST_SELECT request! : %d",pc);
		}
	}

 

Link to comment
Share on other sites

  • Replies 13
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Active Member
void CQuestManager::Select(unsigned int pc, unsigned int selection)
	{
		PC* pPC;

		if ((pPC = GetPC(pc)) && pPC->IsRunning() && pPC->GetRunningQuestState()->suspend_state==SUSPEND_STATE_SELECT)
		{
			pPC->SetSendDoneFlag();

			if (!pPC->GetRunningQuestState()->chat_scripts.empty())
			{
				// äĆĂ ŔĚşĄĆ®ŔÎ °ćżě
				// ÇöŔç Äů˝şĆ®´Â ľî´Ŕ Äů˝şĆ®¸¦ ˝ÇÇŕÇŇ °ÍŔΰˇ¸¦ °í¸Ł´Â Äů˝şĆ® Ŕ̹ǷÎ
				// łˇł»°í Ľ±ĹĂµČ Äů˝şĆ®¸¦ ˝ÇÇŕÇŃ´Ů.
				QuestState& old_qs = *pPC->GetRunningQuestState();
				CloseState(old_qs);

				if (selection >= pPC->GetRunningQuestState()->chat_scripts.size())
				{
					pPC->SetSendDoneFlag();
					GotoEndState(old_qs);
					pPC->EndRunning();
				}
				else
				{
					AArgScript* pas = pPC->GetRunningQuestState()->chat_scripts[selection];
					ExecuteQuestScript(*pPC, pas->quest_index, pas->state_index, pas->script.GetCode(), pas->script.GetSize());
				}
			}
			else
			{
				// on default 
				pPC->GetRunningQuestState()->args=1;
				if (!pPC->GetRunningQuestState()->co) // fix 2 februarie 2018
					sys_err("GetRunningQuestState()->co is null");
				else
					lua_pushnumber(pPC->GetRunningQuestState()->co,selection+1);

				if (!RunState(*pPC->GetRunningQuestState()))
				{
					CloseState(*pPC->GetRunningQuestState());
					pPC->EndRunning();
				}
			}
		}
		else
		{
			// Better handling 5 februarie 2018 by Exygo
			if ((pPC = GetPC(pc)) && pPC->IsRunning() && pPC->GetRunningQuestState()->suspend_state == SUSPEND_STATE_PAUSE)
				return;

			sys_err("wrong QUEST_SELECT request for pc %d (getPC %d isRunning %d GetRunningQuestState %d)",
				int(pc),
				(pPC = GetPC(pc)) ? true : false,
				(pPC = GetPC(pc)) ? true : false ? pPC->IsRunning() : false,
				(pPC = GetPC(pc)) ? true : false ? pPC->GetRunningQuestState()->suspend_state : -1
			);
		}
	}

 

8 minutes ago, Daenerys said:

Again, this is not an error.just notification.
 

Yes, but sometimes the quest window remains frozen and it's unconfortable.

Link to comment
Share on other sites

man think simple, this is an error.

Because its not comfortable for users.

look at the video mk

 

dear @Exygo its a fix?

##

 

update

same, i thin its just syserr hiding?

New syserr after apply this fix (or whatelse)

SYSERR: Feb 6 02:17:45 :: Select: wrong QUEST_WAIT request! : 10002

Link to comment
Share on other sites

  • Premium
1 hour ago, Exygo said:


			sys_err("wrong QUEST_SELECT request for pc %d (getPC %d isRunning %d GetRunningQuestState %d)",
				int(pc),
				(pPC = GetPC(pc)) ? true : false,
				(pPC = GetPC(pc)) ? true : false ? pPC->IsRunning() : false,
				(pPC = GetPC(pc)) ? true : false ? pPC->GetRunningQuestState()->suspend_state : -1
			);

 

 

ehm..

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.