Jump to content

Syntax Error


Soiley

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...