-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
bugSomething isn't workingSomething isn't working
Description
[ script:ps_lib] SCRIPT ERROR: citizen:/scripting/lua/scheduler.lua:750: SCRIPT ERROR: @ps-mdt-v3/server/functions.lua:145: ps-mdt-v3 was unable to execute a query!
[ script:ps_lib] Query: INSERT INTO mdt_profiles (citizenid, fullname, callsign, notes, profilepicture) VALUES (?,?,?,?,?)
[ script:ps_lib] ["CKO24284","Laura Spikes","","",""]
[ script:ps_lib] Duplicate entry '' for key 'callsign'I think this derives from:
https://github.com/Project-Sloth/ps-mdt-v3/blob/30540940ee4ea557c5a339ed28e0616102acef65/server/functions.lua#L131-L148
ps.registerCallback('ps-mdt:hasProfile', function(source)
local src = source
assert(src, 'Player ID cannot be nil')
local citizenId = ps.getIdentifier(src)
if not citizenId then
ps.warn('No citizen ID found for source: ' .. tostring(src))
return false
end
-- Check if the player has a profile in the MDT
local hasProfile = MySQL.scalar.await('SELECT COUNT(*) FROM mdt_profiles WHERE citizenid = ?', { citizenId })
if hasProfile and hasProfile > 0 then
return true
else
MySQL.insert.await('INSERT INTO mdt_profiles (citizenid, fullname, callsign, notes, profilepicture) VALUES (?,?,?,?,?)',
{ citizenId, ps.getPlayerName(source), "", "", "" })
end
end)This occurred when logging out and making a new character (already having another one). It happens every time you load that new character. The MDT profile for that new character does look like it was created though.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working