denizxd Posted January 11, 2021 Posted January 11, 2021 server.lua:48: attempt to concatenate local 'model' (a boolean value) i couldn't succeed.. help mee function sVergiGUI(thePlayer) if thePlayer then source = thePlayer end local playerID = getElementData(source, "dbid") local factID = getElementData(source, "faction") local result = exports.mysql:query("SELECT * FROM vehicles WHERE owner = '"..playerID.."' AND deleted=0") local playerVehs = {} while true do local row = exports.mysql:fetch_assoc(result) if not row then break end local vehicle = exports.pool:getElement("vehicle", row.id) local brand = getElementData(vehicle, "vehbrand") local model = getElementData(vehicle, "vehmodel") local year = getElementData(vehicle, "vehyear") local vergi = getElementData(vehicle, "toplamvergi") or 0 table.insert(playerVehs, { row.id, year.." "..brand.." "..model , tonumber(vergi) }) triggerClientEvent(source, "vergi:VergiGUI", source, playerVehs) end triggerClientEvent(source, "vergi:VergiGUI", source, playerVehs) exports.mysql:free_result(result) end addEvent("vergi:sVergiGUI", true) addEventHandler("vergi:sVergiGUI", root, sVergiGUI)
denizxd Posted January 12, 2021 Author Posted January 12, 2021 1 hour ago, Tekken said: Try model or 0 I tried but it didn't change
SpecT Posted January 12, 2021 Posted January 12, 2021 There is a problem with the script that sets the element data of "vehmodel". Maybe it's something from the database part.
Tekken Posted January 12, 2021 Posted January 12, 2021 That part should take away the error will not 'fix' the code but will take away the error.
Moderators IIYAMA Posted January 12, 2021 Moderators Posted January 12, 2021 (edited) 2 hours ago, SpecT said: Maybe it's something from the database part. Maybe you could get the model from the database instead, since you already fetched the vehicle data. But that only works correctly if the database is up to date. It could become de-synced if: the vehicle model can be changed for the same ID AND the database does not receive an update after every elementdata change. Edited January 12, 2021 by IIYAMA
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now