Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Oudated insertitem.php #153

Open
teammate165 opened this issue Oct 1, 2020 · 1 comment
Open

Oudated insertitem.php #153

teammate165 opened this issue Oct 1, 2020 · 1 comment
Labels

Comments

@teammate165
Copy link

teammate165 commented Oct 1, 2020

The 2.3 Pet update has added additional columns, being "idle2", "spawn", "scale"

insertitem.php's SQL Query is missing those columns as well as not extracting the value for those in the above $escape section, here is an example:
INSERT IGNORE INTO store_item_child VALUES ((SELECT id FROM store_item_parent WHERE name = '".$escape['parent']."'), '".$escape['type']."', '".$escape['uid']."', ".$escape['buyable'].", ".$escape['giftable'].", ".$escape['only'].", '".$escape['auth']."', ".$escape['vip'].", '".$escape['name']."', '".$escape['lvls']."', '".$escape['desc']."', ".$escape['case'].", ".$escape['compose'].", '".$escape['1d']."', '".$escape['1m']."', '".$escape['pm']."', '".$escape['model']."', '".$escape['arms']."', '".$escape['team']."', '".$escape['sound']."', '".$escape['position']."', '".$escape['angles']."', '".$escape['attachment']."', '".$escape['slot']."', '".$escape['material']."', '".$escape['color']."', '".$escape['grenade']."', '".$escape['shortname']."', '".$escape['volume']."', '".$escape['cooldown']."', '".$escape['worldmodel']."', '".$escape['dropmodel']."', '".$escape['weapon']."', '".$escape['effect']."', '".$escape['brightness']."', '".$escape['distance']."', '".$escape['distancefade']."', '".$escape['tag']."', '".$escape['idle']."', '".$escape['run']."', '".$escape['death']."', '".$escape['seed']."', '".$escape['weart']."', '".$escape['paint']."', '".$escape['wearf']."')";

Resulting in this error when executing script:
Insert Failed 1: Column count doesn't match value count at row 1 -> INSERT IGNORE INTO store_item_child VALUES ((SELECT id FROM store_item_parent WHERE name = '受限级'), 'playerskin', 'skin_ninomiya_normal', 1, 1, 0, 'ITEM_NOT_PERSONAL', 0, '二宮飛鳥', '0', '《偶像大师》的中二偶像', 0, 0, '688', '16888', '68888', 'models/player/custom_player/maoling/idolm@ster/ninomiya_asuka/ninomiya.mdl', 'models/player/custom_player/maoling/idolm@ster/ninomiya_asuka/ninomiya_arms.mdl', '3', 'ITEM_NO_SOUND', '0.0 0.0 0.0', '0.0 0.0 0.0', 'ITEM_NO_ATTACHMENT', '0', 'ITEM_NO_MATERIAL', 'ITEM_NO_COLOR', 'ITEM_NO_GRENADE', 'ITEM_NO_SHORTNAME', '1', '60', 'ITEM_NO_WORLDMODEL', 'ITEM_NO_DROPMODEL', 'ITEM_NO_ENTITY', 'ITEM_NO_ID', '5', '150', '50', 'ITEM_NO_TAG', 'ITEM_NO_IDLE', 'ITEM_NO_RUN', 'ITEM_NO_DEATH', '0', '-1', '0', '0')

I also noticed that all entries id column in store_items_child are 0 except for "Buy VIP" which read the correct id from store_items_parent. Could be a result of me incorrectly applying the fix for other categories. I'll double check and respond to this issue later.

@teammate165
Copy link
Author

Additionally, some items aren't being imported using the php script, those are nested in 3 layers deep

"Store"
{
     "Player Accessories"
     {
          "Sound"
          {
                "Overwatch"
                     {
                      Item1
                      Item2
                      Item3
                     }
          }
     }
}

Something like this will result in Item1, Item2, Item3 not being imported the database

@Kxnrl Kxnrl added the BUG label Nov 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants