#CW-Printer with qbox & ox_inventory problem

1 messages · Page 1 of 1 (latest)

plush tendon
#

Hey i just installed a the printer script into my test server. i tried to print a card but i got this error and don't give me any item:

The error line is:

if amount < exports.ox_inventory:CanCarryAmount(source, item) then

The else part of the code is:

elseif Config.Inv == 'ox' then
        if amount < exports.ox_inventory:CanCarryAmount(source, item) then
            if exports.ox_inventory:RemoveItem(source, "cash", amount * Config.PrintCost[item]) then
                exports.ox_inventory:AddItem(source, item, amount, info)
            else
                QBCore.Functions.Notify(source, "Not Enough Money", "error")
            end
        else
            QBCore.Functions.Notify(source, "Cannot carry amount", "error")

        end
    end

the same think happend and for books. any idea?

deft tundra
#

Did you get the code from yesterday?

#

where I updated the ox side of things

plush tendon
#

I am not sure.. i guess yes. At github i see 2 days ago the last update was

#

What more info i should provide to you to help me?

deft tundra
#

Did you add the items to yout items.lua?

plush tendon
#

are those good?

["bctest"] = { label = "BC Test", weight = 350, stack = true, close = true, allowArmed = true, description = "A BC test", },

["book"] = { label = "Book", weight = 350, stack = true, close = true, allowArmed = true, description = "A book", },

["coupon"] = { label = "Coupon", weight = 350, stack = true, close = true, allowArmed = true, description = "A coupon", },

["flyer"] = { label = "Flyer", weight = 350, stack = true, close = true, allowArmed = true, description = "A flyer", },

["newspaper"] = { label = "Newspaper", weight = 350, stack = true, close = true, allowArmed = true, description = "A newspaper", },

["menu"] = { label = "Menu", weight = 350, stack = true, close = true, allowArmed = true, description = "A menu", },

deft tundra
#

Yeah. But youre using a business_card in the error

#

so make sure to change that to "bctest" in the config

plush tendon
#

oh ;-; not sure where i found bctest lmao

#

Now i got this problem, is any specific way i have to upload the link?

deft tundra
plush tendon
#

very weird because i tried it but not having any luck =/

deft tundra
plush tendon
#

so if i copy the image from the link and add .png it will not work?

deft tundra
#

no because this links to a page not an image

#

here's the image link

plush tendon
#

Okayy so i have to upload it to something like discord. i will try it and let you know ^_^

deft tundra
#

No, you can use imgur

#

but you gotta grab the picture link directly

#

right click and open image