I do not understand you suggest.
[Release] MySQL Async Library - 3.0.8
Run this query in your database, it should fix your issue. An index over both rows that are queried in your WHERE statement solves the issue.
I do not have much knowledge. I just started. Would you like to suggest a step-by-step solution?
for i=1, #xPlayer.inventory, 1 do
if ESX.LastPlayerData[xPlayer.source].items[xPlayer.inventory[i].name] ~= xPlayer.inventory[i].count then table.insert(asyncTasks, function(cb) MySQL.Async.execute('UPDATE user_inventory SET `count` = @count WHERE identifier = @identifier AND item = @item', { ['@count'] = xPlayer.inventory[i].count, ['@identifier'] = xPlayer.identifier, ['@item'] = xPlayer.inventory[i].name }, function(rowsChanged) cb() end) end) ESX.LastPlayerData[xPlayer.source].items[xPlayer.inventory[i].name] = xPlayer.inventory[i].count end
end
yes, because it is indexed now. it does not need to search the entire table for the appropriate rows.
I just installed the last version, but every time i start the server this error comes out⌠what can I do to fix it?
Error loading script mysql-async.js in resource TODO: TypeError: global.exports is not a function
stack:
TypeError: global.exports is not a function
at Object.<anonymous> (mysql-async.js:4979:8)
at webpack_require (mysql-async.js:20:30)
at mysql-async.js:84:18
at mysql-async.js:87:10
Failed to load script mysql-async.js.
obviously his reuserver hangs on the server. The server can not print or do anything. DuhâŚ
I just installed the latest version and I am getting this error, I used to use your older version a few months back before I got busy with work, I started fresh and deleted and updated everything for my server, but now I am getting this and it will not start. Iâve been trying to fix it my self not sure how.
This is what i put in server.cfg not sure if its changed.
set es_enableCustomData 1
set mysql_connection_string âserver=127.0.0.1;database=essentialmode;userid=root;password=passwordâ
Error loading script mysql-async.js in resource TODO: TypeError: global.exports is not a function
stack:
TypeError: global.exports is not a function
at Object. (mysql-async.js:4979:8)
at webpack_require (mysql-async.js:20:30)
at mysql-async.js:84:18
at mysql-async.js:87:10
Failed to load script mysql-async.js.
October 18th 2018 release, I think it might be my couch db i just notice it was outdated? possibly @Syntasu
Uuuh that should be fine, weird that it doesnât recognize those global.exports
calls, maybe something @zr0iq might need to take a look at.
Or could you make a log of your server output, there might be more to the story here.
Yeah probably sucks too am in the middle of a deadline lol, but it is what it is once its fixed or find a fix I will set it up thanks though @Syntasu
Please provide a server log
If you are on windows, use this:
../artifacts/run.cmd +exec server.cfg > output.txt
Basically append the > output.txt
part and run the server for like 30 seconds.