Bad argument @ 'getPlayerAccount' [Expected element at argument 1,got boolean]
Bad argument @ 'getAccountName' [Expected element at argument 1,got boolean]
my code:
db = dbConnect( "sqlite", "db.db" )
function checkFraction(player)
local acc = getPlayerAccount(player)
local playerName = getAccountName(acc)
local result = dbPoll(dbQuery(db,"SELECT * FROM `fraction` WHERE login = ?",playerName),-1)
if #result > 0 then
for i,v in ipairs(result) do
outputChatBox('This fraction : '..v.fractionId,player)
end
else
outputChatBox("Error",player)
end
end
checkFraction()
please help me