[Release] Inventory System v2.1 (Personal Menu)

thank :ok_hand:
fix Error Code: 1068. Multiple primary key defined

Thanks, the fix will be work @Tospik

Nobody know for me ?! http://prntscr.com/eyupz4

Yes i have a same error pls help

1 Like

Dude you d’ont know he do these http://prntscr.com/eyvcfm ?

Ok so i have fixed http://prntscr.com/eyvkev

so on users you have a identifier like: http://prntscr.com/eyvkwn
so you need to create a index like: http://prntscr.com/eyvl8e
and you need to down the 255 value on 70 like on my screen
so after do that go to user_inventory and do the same of me ^^ like:
http://prntscr.com/eyvlzz
http://prntscr.com/eyvm7l
and go test now in game.

Can you make an exemple for how to add a item please ? i mean the syntax :slight_smile:

Nervermind i found it… But how we can test the item ? have you a script for add item to the player ?

1 Like

I’m working on a script of recolting items but now you can’t really test it, that why

I wrote It’s a resource more for developers.

:wink:

3 Likes

It’s fast to create it ?

Ayone have good sql script for me please it’s not working with fix for me
Thanks

Can you give me the link for see how to add a item pls

Can you send me your database script please ?

It’s not working for me

1 Like

Show me your data base on users

1 Like

DROP TABLE IF EXISTS items;

CREATE TABLE items (
id int(11) unsigned NOT NULL AUTO_INCREMENT,
libelle varchar(255) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE users
ADD PRIMARY KEY (identifier);

DROP TABLE IF EXISTS user_inventory;

CREATE TABLE user_inventory (
user_id varchar(255) CHARACTER SET utf8mb4 NOT NULL DEFAULT ‘’,
item_id int(11) unsigned NOT NULL,
quantity int(11) DEFAULT NULL,
PRIMARY KEY (user_id,item_id),
KEY item_id (item_id),
CONSTRAINT user_inventory_ibfk_1 FOREIGN KEY (user_id) REFERENCES users (identifier),
CONSTRAINT user_inventory_ibfk_2 FOREIGN KEY (item_id) REFERENCES items (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Hum i use heidi sql so its not the same workbench, np so do you create a index for identifier ? first

Can you give me the link dude for add item pls thks

I have HeidiSQL
Can you give me back your script for user_inventory please it was deleted