Jump to content

[Py] How to use the def AddItemData function?


Recommended Posts

  • Active+ Member

Hello there. How do we use the def AddItemData function in Python?

When calling this function elsewhere, do we have to call all the arguments in it?

 

examp func:

def AddItemData(self, itemVnum, metinSlot, attrSlot = 0, evolution = 0, flags = 0, unbindTime = 0, window_type = player.INVENTORY, slotIndex = -1, preview = 0):

 

and in the def SetInventoryItem:

self.AddItemData(itemVnum, metinSlot, attrSlot, player.GetItemEvolution(window_type, slotIndex), window_type, slotIndex, 1)

Can we call it?

Link to comment
Share on other sites

  • Active+ Member

If the argument have a default value and you don't need that argument you can skip it. And if you need let's say the last argument (which have a default value) you can use it like this :

self.AddItemData(itemVnum, metinSlot, attrSlot, preview = 1)

 

  • Metin2 Dev 1
Link to comment
Share on other sites

  • Active+ Member
9 minutes ago, Abel(Tiger) said:

If the argument have a default value and you don't need that argument you can skip it. And if you need let's say the last argument (which have a default value) you can use it like this :

self.AddItemData(itemVnum, metinSlot, attrSlot, preview = 1)

 

Thanks ❤️

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.