Jump to content

Can you help me with this code?


crixpx

Recommended Posts

Hello and thank you for visiting this post... I am looking for help with this inventory system, the problem is that I want to add custom items but when I do it the script fails and when I open the inventory the cursor disappears and it does not matter which category I add the element. I can't add more than 9, in my case I want to add the clotching10 here.

	[8] = {
		{"clothing2", 1,"images/inventory/clothing.png", "inventorydescription30", "inventoryactiontext15"},
		{"clothing3", 1,"images/inventory/clothing.png", "inventorydescription30", "inventoryactiontext15"},
		{"clothing4", 1,"images/inventory/clothing.png", "inventorydescription30", "inventoryactiontext15"},
		{"clothing5", 1,"images/inventory/clothing.png", "inventorydescription30", "inventoryactiontext15"},
		{"clothing6", 1,"images/inventory/clothing.png", "inventorydescription30", "inventoryactiontext15"},
		{"clothing9", 1,"images/inventory/clothing.png", "inventorydescription30", "inventoryactiontext15"},
		{"clothing1", 1,"images/inventory/clothing.png", "inventorydescription30", "inventoryactiontext15"},
		{"clothing7", 1,"images/inventory/clothing.png", "inventorydescription30", "inventoryactiontext15"},
		{"clothing8", 1,"images/inventory/clothing.png", "inventorydescription30", "inventoryactiontext15"},
		{"backpack5", 1,"images/inventory/equipment/drybag.png", "inventorydescription51", "inventoryactiontext18"},
		{"backpack4", 1,"images/inventory/equipment/leathersack.png", "inventorydescription39", "inventoryactiontext18"},
		{"backpack6", 1,"images/inventory/equipment/tortillabackpack.png", "inventorydescription65", "inventoryactiontext18"},
		{"backpack7", 1,"images/inventory/equipment/alicebackpack.png", "inventorydescription66", "inventoryactiontext18"},
		{"backpack3", 1,"images/inventory/equipment/huntingbackpack.png", "inventorydescription40", "inventoryactiontext18"},
		{"backpack2", 1,"images/inventory/equipment/boulderbackpack.png", "inventorydescription41", "inventoryactiontext18"},
		{"backpack1", 1,"images/inventory/equipment/coyotebackpack.png", "inventorydescription42", "inventoryactiontext18"},
		{"helmet1", 1,"images/inventory/equipment/specialforceshelmet.png", "inventorydescription68", "inventoryactiontext22"},
		{"helmet2", 1,"images/inventory/equipment/militaryhelmet.png", "inventorydescription68", "inventoryactiontext22"},
		{"helmet3", 1,"images/inventory/equipment/motorcyclehelmet.png", "inventorydescription68", "inventoryactiontext22"},
		{"helmet4", 1,"images/inventory/equipment/swathelmet.png", "inventorydescription68", "inventoryactiontext22"},
		{"helmet5", 1,"images/inventory/equipment/welderhelmet.png", "inventorydescription68", "inventoryactiontext22"},
		{"helmet6", 1,"images/inventory/equipment/cap.png", "inventorydescription70", "inventoryactiontext22"},
		{"helmet7", 1,"images/inventory/equipment/ushanka.png", "inventorydescription70", "inventoryactiontext22"},
		{"vest1", 1,"images/inventory/equipment/policevest.png", "inventorydescription69", "inventoryactiontext23"},
		{"vest2", 1,"images/inventory/equipment/militaryvest.png", "inventorydescription69", "inventoryactiontext23"},
	},

but when I add it the script breaks :c I know a little about lua but this is out of my hands

full code and repository 

https://github.com/rivor/mta-dayz/blob/master/dayzepoch/inventory.lua

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...