Jump to content

Recommended Posts

  • Premium

pYTHONSHOP.CPP

EDIT LIKE THAT

PyObject * shopGetItemPrice(PyObject * poSelf, PyObject * poArgs)
{
    int iIndex;
    if (!PyTuple_GetInteger(poArgs, 0, &iIndex))
        return Py_BuildException();

    const TShopItemData * c_pItemData;
    if (CPythonShop::Instance().GetItemData(iIndex, &c_pItemData))
        return Py_BuildValue("L", c_pItemData->price);

    return Py_BuildValue("i", 0);
}

  • Love 1


 

Link to comment
Share on other sites

  • Premium
16 minutes ago, .T4Ump said:

pYTHONSHOP.CPP EDITAR ASI
 

PyObject * shopGetItemPrice (PyObject * poSelf, PyObject * poArgs)
{
    int iIndex;
    (! PyTuple_GetInteger (poArgs, 0, y iIndex)) si
        regresan Py_BuildException ();

    const * TShopItemData c_pItemData;
    si (. CPythonShop :: Instancia () GetItemData (iIndex, y c_pItemData))
        vuelven Py_BuildValue ( "L", c_pItemData-> precio);

    volver Py_BuildValue ( "i", 0);
}

thank you very much, it worked

  • Love 1
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.