This is giving me some errors:
Citizen.CreateThread(function()
MySQL.Async.fetchAll(
'SELECT * FROM items',
{},
function(result)
for i=1, #result, 1 do
ItemsLabels[result[i].name] = result[i].label
end
end
)
end)
It’s from a very old mysql, any clue how to rewrite it correctly?
bsimser
September 17, 2019, 7:10pm
2
Please post the errors you’re getting with this statement.
Your issue is on ge/server/main.lua line 45.
I know. But the problem is i do not know why, the picture in the middle is line 45.
Does it print anything for result before doing anything with it?
There is nothing wrong with the script. It referres to your database. As you can see it says mysql which is referring to your database. Maybe look there?
2 Likes
bsimser
September 18, 2019, 3:21pm
8
You might want to turn debug on in the mysql configuration so you see all of the statements being issued. Not a lot to go on here.