Jump to content
For maintenance and updates, the community will be offline on 31 December 2022 ×
  • 0

[Py] How to use the def AddItemData function?


blaxis

Question

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

2 answers to this question

Recommended Posts

  • 0
  • Bronze

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)

 

Link to comment
Share on other sites

  • 0
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Activity

    1. 1

      Costume shining/costume effect system

    2. 992

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

    3. 3

      Biologist Manager (C++ & LUA)

    4. 3

      Visual studio 2022 compiling issue

    5. 63

      Metin2 | Mount System Renewal

    6. 58

      Metin2 2004 Beta Client

    7. 0

      🔥Paradise2 PVP SERVER GLOBAL!! EN-ES-PT 🕐📢Apertura 11 de diciembre 21 horas de España!

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.