Jump to content

Input: no quest running for pc, cannot process input : 1 - ITEMSHOP


Recommended Posts

Hello, I would like to receive tImaghe help of someone.

I am trying to install this ItemShop. It works normally but it closes continuously and when doing a function an input quest appears (I attach images).

 

URL IMAGES : https://metin2.download/picture/B4fPgshw12drsQLBO7g7Erdr5x67Bb27/.gif

quest itemshop_manager begin
	state start begin
		
		when login begin
			cmdchat('ITEMSHOP QID#'..q.getcurrentquestindex())
			cmdchat('ITEMSHOP CLEAR_WHEEL_CONTENT#')
			itemshop.load_wheel_items()
			itemshop.load_logs('all')
		end
		
		when button begin
			cmdchat('ITEMSHOP INPUT#1')
			local shop = split(input(cmdchat('ITEMSHOP SEND#')), '#')
			cmdchat('ITEMSHOP INPUT#0')
			
			if pc.is_gm() then
				if shop[1] == 'ADD_ITEM_TIME' then
					itemshop.admin_add_item_time(tonumber(shop[2]), tonumber(shop[3]), tonumber(shop[4]), tonumber(shop[5]))
				elseif shop[1] == 'ADD_CATEGORY_TIME' then
					itemshop.admin_add_category_time(tonumber(shop[2]), tonumber(shop[3]), tonumber(shop[4]), tonumber(shop[5]))
				elseif shop[1] == 'ADD_ITEM' then
					local attrs = {{tonumber(shop[4]),tonumber(shop[5])},{tonumber(shop[6]),tonumber(shop[7])},{tonumber(shop[8]),tonumber(shop[9])},{tonumber(shop[10]),tonumber(shop[11])},{tonumber(shop[12]),tonumber(shop[13])},{tonumber(shop[14]),tonumber(shop[15])},{tonumber(shop[16]),tonumber(shop[17])}}
					local sockets = {tonumber(shop[18]),tonumber(shop[19]),tonumber(shop[20])}
					itemshop.admin_add_item(tonumber(shop[2]), tonumber(shop[3]), tonumber(shop[21]), attrs, sockets, tonumber(shop[22]))
				elseif shop[1] == 'DELETE_ITEM' then
					itemshop.admin_delete_item(shop[2], tonumber(shop[3]))
				elseif shop[1] == 'CHANGE_PRICE' then
					itemshop.admin_edit_item_price(shop[2], tonumber(shop[3]), tonumber(shop[4]))
				end
			end
			if shop[1] == 'REQUEST_SPIN_WHEEL' then
				if pc.getqf('enable_wheel') == 1 then return end
				itemshop.request_spin_wheel()
			elseif shop[1] == 'REQUEST_PRIZE_WHEEL' then
				if pc.getqf('enable_wheel') < 1 then
					return
				end
				pc.give_item2(tonumber(shop[2]), 1)
				pc.setqf('enable_wheel', 0)
			elseif shop[1] == 'OPEN_SHOP' then
				cmdchat('ITEMSHOP CLEAR_CONTENT#')
				itemshop.get_coins()
				itemshop.get_3rd()
				itemshop.create_categorys()
				itemshop.load_items()
				itemshop.load_hotoffers()
				itemshop.load_mostbought()
				itemshop.open_shop()
			elseif shop[1] == 'CLOSE_SHOP' then
				itemshop.close_shop()
			elseif shop[1] == 'BUY_ITEM' then
				itemshop.buy_item(shop[2], tonumber(shop[3]), tonumber(shop[4]))
			elseif shop[1] == 'UPDATE_COINS' then
				if pc.getqf('update_coins') > get_time() then
					syschat("Debes esperar "..(pc.getqf('update_coins')-get_time()).."s para volver a recargar las coins.")
					return
				end
				itemshop.get_coins()
				itemshop.get_3rd()
				pc.setqf('update_coins', get_time() + 10)
			end
		end
		
	end
end

 

In channel syserr I have this error:

SYSERR: Apr 14 04:56:45 :: Input: no quest running for pc, cannot process input : 1

Help me?

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Contributor

Does this only happen when you are a GM or for all players?

You said you'll add images, I don't see any of them.

 

That syserr is coming from questmanager

void CQuestManager::Input(unsigned int pc, const char* msg)

and it means that the quest isn't running(for that player, from what I see). Maybe something's cleaning it up?

  • Metin2 Dev 1
Link to comment
Share on other sites

On 4/15/2022 at 11:35 AM, Amun said:

Does this only happen when you are a GM or for all players?

You said you'll add images, I don't see any of them.

 

That syserr is coming from questmanager

void CQuestManager::Input(unsigned int pc, const char* msg)

and it means that the quest isn't running(for that player, from what I see). Maybe something's cleaning it up?

Image: https://metin2.download/picture/B4fPgshw12drsQLBO7g7Erdr5x67Bb27/.gif

When opening with the designated F5 button it appears like this and the client closes. And it happens being GM and those who are not GM.

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

11 minutes ago, Amun said:

I really can not say anything for sure. My advice is to add logs in both the quest and the client. It won't solve anything, but at least it would give you an idea about why it's crashing.

 

What about the client? Do you get any errors in there?

No colleague in client does not register anything, each function that the itemshop does will open as if it were a quest, how would it be corrected?

Link to comment
Share on other sites

1 minute ago, Amun said:

Well, yeah, I get that, but you still need some code in the client to make that possible, right? It won't just magically appear just because you think about it.

Anyhow, like I said previously - Add Logs everywhere and see where it hits the fan

How could you help me in that to add to see the records?

Link to comment
Share on other sites

  • Contributor

Just add say("whatever") in lua and print("whatever") in python..

Look inside questlua_global.cpp..

            {    "sys_err",                    _syserr                    },
            {    "sys_log",                    _syslog                    },
            {    "char_log",                    _char_log                },
            {    "item_log",                    _item_log                },
            {    "say",                        _say                    },
            {    "chat",                        _chat                    },
            {    "cmdchat",                    _cmdchat                },
            {    "syschat",                    _syschat                },
            {    "notice",                        _notice                            },
            {    "notice_all",                    _notice_all                        },
            {    "notice_in_map",                _notice_in_map                    },
            {    "say_in_map",                    _say_in_map                        },    
 

Use whatever you want, just make sure you can see the output if it's crashing.

 

Good luck

Link to comment
Share on other sites

19 hours ago, Amun said:

Just add say("whatever") in lua and print("whatever") in python..

Look inside questlua_global.cpp..

            {    "sys_err",                    _syserr                    },
            {    "sys_log",                    _syslog                    },
            {    "char_log",                    _char_log                },
            {    "item_log",                    _item_log                },
            {    "say",                        _say                    },
            {    "chat",                        _chat                    },
            {    "cmdchat",                    _cmdchat                },
            {    "syschat",                    _syschat                },
            {    "notice",                        _notice                            },
            {    "notice_all",                    _notice_all                        },
            {    "notice_in_map",                _notice_in_map                    },
            {    "say_in_map",                    _say_in_map                        },    
 

Use whatever you want, just make sure you can see the output if it's crashing.

 

Good luck

I couldn't do anything mate, I have this problem with other files.

 

Unknown Server Command ITEMSHOP OPEN#1 | ITEMSHOP

Link to comment
Share on other sites

On 4/15/2022 at 11:35 AM, Amun said:

Does this only happen when you are a GM or for all players?

You said you'll add images, I don't see any of them.

 

That syserr is coming from questmanager

void CQuestManager::Input(unsigned int pc, const char* msg)

and it means that the quest isn't running(for that player, from what I see). Maybe something's cleaning it up?

 

4 minutes ago, Amun said:

You're basically sending that ITEMSHOP command from the server and the client has no idea about what the fuck that means.

Take a look in 

UserInterface/PythonNetworkStreamCommand.cpp

void CPythonNetworkStream::ServerCommand(char * c_szCommand)

Colleague the itemshop that I try to install, does not require files in source client.

Only in questlua_global.cpp that adds "mysql_direct_query".

Does it have to do with some cases of serverfiles that instead of being "uiScriptLocale" it is "uiscriptlocale", it is case sensitive?

Link to comment
Share on other sites

  • Contributor

Mate, I'm just telling you what the errors mean and where they're coming from. I've never used this, so I can't say anything for sure. Yet, if you're sending a command to the client, I would assume that the client has to know what that command means, right?

 

No, it isn't case sensitive(unless you use Cython). If it was case sensitive, you wouldn't be able to enter the game.

 

Edit: Here, take a look at this, maybe you'll find it useful: 

 

Edited by Amun
typo
Link to comment
Share on other sites

9 minutes ago, Amun said:

Mate, I'm just telling you what the errors mean and where they're coming from. I've never used this, so I can't say anything for sure. Yet, if you're sending a command to the client, I would assume that the client has to know what that command means, right?

 

No, it isn't case sensitive(unless you use Cython). If it was case sensitive, you wouldn't be able to enter the game.

Do you know how it would be to open the itemshop from the coin?

Link to comment
Share on other sites

54 minutes ago, Amun said:

Look inside game.py

	def __InGameShop_Show(self, url):
		if constInfo.IN_GAME_SHOP_ENABLE:
			self.interface.OpenWebWindow(url)

Just change self.interface.OpenWebWindow with whatever you want it to do

https://metin2.download/picture/uyPGUtn37mXlMbR8pE4GNslGda2xQ4Jq/.gif

It works, that input problem is not removed:

 

Errorr: Input: no quest running for pc, cannot process input : 1

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Contributor

I think it may be because of this:

local shop = split(input(cmdchat('ITEMSHOP SEND#')), '#')

It's asking for input there, add an option to not show the input if it's a command

 

Edit: You can find basically anything if you look well enough:

 

Edited by Amun
Link to possible solution
Link to comment
Share on other sites

22 minutes ago, Amun said:

I think it may be because of this:

local shop = split(input(cmdchat('ITEMSHOP SEND#')), '#')

It's asking for input there, add an option to not show the input if it's a command

 

Edit: You can find basically anything if you look well enough:

 

Solution:

 

Search: in constinfo.py

IN_GAME_SHOP_ENABLE = 1

Add: INPUT IGNORE = 0

Find: in game.py

	def OpenQuestWindow(self, skin, idx):
	self.interface.OpenQuestWindow(skin, idx)

Replace:
	def OpenQuestWindow(self, skin, idx):
		if not int(constInfo.INPUT_IGNORE) == 1:
			self.interface.OpenQuestWindow(skin, idx)

Thank you, ready: https://metin2.download/picture/uyPGUtn37mXlMbR8pE4GNslGda2xQ4Jq/.gif

Quote

Unknown Server Command ITEMSHOP OPEN#1 | ITEMSHOP

 

I have not been able to solve this error colleague

Edited by Metin2 Dev
Core X - External 2 Internal
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.