Soiley Posted December 7, 2018 Share Posted December 7, 2018 Im trying to make a DB table, when i run the server it says dbexec failed, near "-" Syntax error.... here is the code of the lua function createVehicleForPlayer(player, command, model) local db = exports.db:getConnection() local x, y, z = getElementPosition(player) y = y + 5 dbExec(db, "INSERT INTO vehicles (model, x, y, z) VALUES (?. ?. ?. ?)", model, x, y, z) createVehicle(model, x, y, z) end addCommandHandler("createveh",createVehicleForPlayer, false, false) addCommandHandler("vehcreate",createVehicleForPlayer, false, false) Link to comment
Moderators Patrick Posted December 7, 2018 Moderators Share Posted December 7, 2018 You used a point instead of a comma. "INSERT INTO vehicles (model, x, y, z) VALUES (?,?,?,?)" Link to comment
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