Hi. I tried to do the following:
playerId = PlayerId()
playerServerId = GetPlayerServerId()
playerName = GetPlayerName(playerId)
RegisterCommand('save2', async (source, args, raw) => {
let argsConcat
let argString = argsConcat.concat(args)
print("Teste 1")
global.exports["mysql-async"].mysql_fetch_all(
"INSERT INTO main (name, args) VALUES (@name, @args)", { "name": playerName, "args": argString}, (result) => {
emit("output", source, argString);
})
print("Teste 2")
}, false);
However, it isn’t working. Nothing happens. Nothing is saved in the database. I don’t know what’s wrong.