Jump to content

Recommended Posts

Ey!

I have been having some problems these days in Python regarding calls from the server. Since I've been trying to understand what's happening for quite a few hours, I've searched for python documentation and unless I'm forgetting something, I can't understand the problem i having on this.

Well. im using some prints to understand the thing, so when i open the game, i get this:
 

Clearing all recipes
Adding recipe: recipe_id=1, recipe_id=1, itemvnum=27995
Recipes stored: 1
Adding recipe: recipe_id=1, recipe_id=18, itemvnum=72724
Recipes stored: 2
[...]
Recipes stored: 31
Refreshing recipe list. Total recipes to display: 31
Attempting to display recipe 0 with itemvnum=27995, item_name=Botella Vacia
Attempting to display recipe 1 with itemvnum=72724, item_name=Elixir del Sol (M)
[...]


So everything keeps working as i expected, i recieve the call, i took it with a function i put in my new file, this one (im reducing the code):
 

		recipeListBox = ListBoxSearch()
		recipeListBox.SetParent(self.GetChild("recipe_listbox"))
		recipeListBox.SetPosition(4, 4)
		recipeListBox.SetSize(200-4-4, 17 * recipeListBox.stepSize)
		recipeListBox.SetEvent(ui.__mem_func__(self.OnSelectItem))
		recipeListBox.SetMinSearchTextLen(1)
		recipeListBox.SetEditLine(self.GetChild("itemsearch"))
		recipeListBox.Show()
		self.recipeListBox = recipeListBox

	def AddRecipe(self, recipe_id[...]
		print "Adding recipe: [...]
		recipelist = {
			"recipe_id": [...]

		self.recipes.append(recipelist)

		item.SelectItem(itemvnum)
		item_name = item.GetItemName()
		if item_name:
			self.recipeListBox.InsertItem(len(self.recipes) - 1, "%s (ID: %d)" % (item_name, recipe_id))
		else:
			print "Failed to get item name for itemvnum: %d" % itemvnum


Alright, everything seems to work at the beginning, but when i tried to open the ui, then i get this:
 

Recipes before opening the interface: 0
Refreshing recipe list. Total recipes to display: 0


I see all my code is making the same instance, i call the same file, everytime and i tried to make a function apart and a class instead of using just a new method, but i got no results. Seems like list is loading when im in loading screen, but it doesnot save in memory or smthing, then when i try to refresh the list opnening de ui, this happens.

Can i get some help? if possible. Maybe im missunderstanding something like the position of the callings, or maybe im just too dumb i can get it.

Ty in advance.

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.