Kxnrl / Store

Store plugin for Source Engine Games.
https://github.com/Kxnrl/Store
90 stars 44 forks source link

error when importing database.sql #79

Closed Drmohammad11 closed 4 years ago

Drmohammad11 commented 5 years ago

hi my friend! i used last version of store plugin! i have this problem: http://uupload.ir/files/1bzp_untitled.png

SQL query: CREATE TABLE store_items ( id int(11) NOT NULL AUTO_INCREMENT, player_id int(11) NOT NULL, type varchar(16) NOT NULL, unique_id varchar(192) NOT NULL DEFAULT '', date_of_purchase int(11) unsigned NOT NULL DEFAULT '0', date_of_expiration int(11) unsigned NOT NULL DEFAULT '0', price_of_purchase int(11) unsigned NOT NULL DEFAULT '1', PRIMARY KEY (id), UNIQUE KEY p (player_id,type,unique_id) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4

MySQL said:

1071 - Specified key was too long; max key length is 767 bytes

thank you!

Drmohammad11 commented 5 years ago

please help :(

Drmohammad11 commented 5 years ago

@Kxnrl please help. :((

Kxnrl commented 5 years ago
unique_id varchar(32)
Drmohammad11 commented 5 years ago
unique_id varchar(32)

tnx. fixed

Drmohammad11 commented 5 years ago

i have a problem: i added after database.sql ,addparent.sql and additem.sql:

SQL query: INSERT INTO store_item_child ( parent, type, uid, buyable, giftable, only, auth, vip, name, 1d, 1m, pm, slot, model, worldmodel, dropmodel, weapon ) VALUES ( '{YOUR PARENT ID FROM store_item_parent}', -- parten id 'hat', -- force to 'hat' '{unique_identifier}', -- maxlen 32 bytes '1', -- 1 = can buy '1', -- 1 = can gift '0', -- 1 = not included in opening case system. 'ITEM_NOT_PERSONAL', -- if personal item, set to steamid , e.g. "STEAM_1:1:44083262," '0', -- 1 = free for VIP user '{Item name in store main menu}', -- maxlen 64 bytes '{price[...]

MySQL said:

1136 - Column count doesn't match value count at row 1

Kxnrl commented 5 years ago

why not modify value??? that is a template..

Drmohammad11 commented 5 years ago

i used default models and sounds this link https://github.com/Kxnrl/Store/tree/master/resources

how i can add iteams??

Kxnrl commented 5 years ago

template here https://github.com/Kxnrl/Store/blob/master/utils/additem.sql

Drmohammad11 commented 5 years ago

i used https://github.com/Kxnrl/Store/blob/master/utils/insertItem.php for add https://github.com/Kxnrl/Store/blob/master/configs/store/items.txt to database!! successfull.

but i have this error when connect to server: L 08/16/2019 - 12:39:29: Info (map "awp_lego_2011") (file "errors_20190816.log") L 08/16/2019 - 12:39:29: [SM] Exception reported: Script execution timed out L 08/16/2019 - 12:39:29: [SM] Blaming: store.smx L 08/16/2019 - 12:39:29: [SM] Call stack trace: L 08/16/2019 - 12:39:29: [SM] [1] Line 448, E:\Servers\Plugins CSGO SERVER\Scripts\sourcemod-1.9.0-git6281-windows\include\string.inc::FindCharInString L 08/16/2019 - 12:39:29: [SM] [2] Line 107, E:\Servers\Plugins CSGO SERVER\Scripts\sourcemod-1.9.0-git6281-windows\include\store_stock.inc::Downloader_AddFileToDownloadsTable L 08/16/2019 - 12:39:29: [SM] [3] Line 142, store/modules/skin.sp::PlayerSkins_OnMapStart L 08/16/2019 - 12:39:29: [SM] [5] Call_Finish L 08/16/2019 - 12:39:29: [SM] [6] Line 303, store.sp::OnMapStart L 08/16/2019 - 12:39:29: [SM] Exception reported: Array index out-of-bounds (index 67, limit 64) L 08/16/2019 - 12:39:29: [SM] Blaming: store.smx L 08/16/2019 - 12:39:29: [SM] Call stack trace: L 08/16/2019 - 12:39:29: [SM] [1] Line 302, store.sp::OnMapStart

Kxnrl commented 5 years ago

change script exec timeout value to 999

Drmohammad11 commented 5 years ago

change script exec timeout value to 999

how i can change this value??

Drmohammad11 commented 5 years ago

can you help me ? please :((

Kxnrl commented 5 years ago

can you help me ? please :((

addons/sourcemod/configs/core.cfg