TheMrDeivid / ESX_shops_with_bars

Check my post on the FiveM Forums: https://forum.fivem.net/t/new-update-17-09-2019-release-esx-shops-with-bars-v-1-6-esx-supermarket-feature/85625
https://twitch.tv/TheMrDeivid
13 stars 16 forks source link

MySQL Critical Error #1

Open Janicki92 opened 5 years ago

Janicki92 commented 5 years ago

[ERROR] [MySQL] An critical error happens on MySQL for query “SELECT * FROM shops LEFT JOIN items ON items.name = shops.item {=}”: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException (System.ExceptionResource resource) [0x0000b] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0 at System.Collections.Generic.Dictionary 2[TKey,TValue].Insert (TKey key, TValue value, System.Boolean add) [0x0007c] in &lt;0123fd5b1a1040fe9d70a7e0d4b28acb&gt;:0 at System.Collections.Generic.Dictionary 2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0 at MySQLAsync.FetchAll+<ReaderAsync>d__2.MoveNext () [0x000e9] in <6b79789832b34a31961dbb39358e1b3f>:0 — End of stack trace from previous location where exception was thrown — at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0 at System.Runtime.CompilerServices.TaskAwaiter 1[TResult].GetResult () [0x00000] in &lt;0123fd5b1a1040fe9d70a7e0d4b28acb&gt;:0 at MySQLAsync.Operation 1+<ExecuteAsync>d__3[TResult].MoveNext () [0x00169] in <6b79789832b34a31961dbb39358e1b3f>:0

Janicki92 commented 5 years ago

I emptied my Shops table, inserted your most recent SQL file to ensure no issues. There are no duplicate items with key IDs under the Item tables or the Shop tables.

M1K3-NL commented 5 years ago

Delete the table ID from shops will fix it.

Janicki92 commented 5 years ago

I’m sorry for my ignorance, but what do you mean? I dropped my “items” and “shops” tables, added the ones included in this pack and still receive this error on server start-up.

M1K3-NL commented 5 years ago

Column ID must be removed

blazorin commented 5 years ago

dont delete column ID, just one of your items have the same ID as other item added before