Moin bekomme 3 Errors in der Console und komme gerade nicht weiter xd
Code
An error hapens on mysql for query "SELECT * FROM donators WHERE identiefier = ; connect ETIMEDOUT
Code
An error hapens on mysql for query "SELECT ´charid´ FROM ´user_lastcharacter´WHERE ´steamid´ = ; connect ETIMEDOUT
Code
SCRIPT ERROR @charackter/server/main.lua:67: attempt to index a nil value (local `LastChar´)
SCRIPT ERROR @charackter/server/main.lua:67: attempt to index a nil value (local `resutl´)
code
Code
local identifier = GetPlayerIdentifiers(src)[1]
MySQL.Async.fetchAll('SELECT * FROM donators WHERE identifier=@identifier', {['@identifier'] = identifier},
function (result)
for i=1, #result[1].donators, 1 do
TriggerClientEvent('routeC:SetupDonator', src)
end
end
)
Code
function GetLastCharacter(source)
local LastChar = MySQLAsyncExecute("SELECT `charid` FROM `user_lastcharacter` WHERE `steamid` = '"..GetPlayerIdentifiers(source)[1].."'")
if LastChar[1] ~= nil and LastChar[1].charid ~= nil then
return tonumber(LastChar[1].charid)
else
MySQLAsyncExecute("INSERT INTO `user_lastcharacter` (`steamid`, `charid`) VALUES('"..GetPlayerIdentifiers(source)[1].."', 1)")
return 1
end
end