Jump to content

amiz

Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral

About amiz

  • Rank
    Newbie
  1. vehicles\vehicles.lua:6: dbExec failed; (1) incomplete input but I still have errors with the new script
  2. Ok I don't understand exactly, So am just gonna wait when you can response with the proper script cause am a newbie at scriping
  3. vehicles\vehicles.lua:9: dbExec failed; (1) incomplete input am trying to make a database where my vehicles save, but it dosent work outputChatBox("type") function createVehicleForPlayer(player, command, model) local db = exports.db:getdbconnection() local x ,y ,z = getElementPosition(player) y = 5 dbExec (db, "CREATE TABLE IF NOT EXISTS `vehicles` (id INT, model INT, x FLOAT, y FLOAT, z FLOAT") createVehicle(model, x, y, z) end addCommandHandler("createvehicle", createVehicleForPl
  4. vehicles\vehicles.lua:9: dbExec failed; (1) near "exist": syntax error outputChatBox("type") function createVehicleForPlayer(player, command, model) local db = exports.db:getdbconnection() local x ,y ,z = getElementPosition(player) y = 5 dbExec (db,"Create table if not exist vehicles id int, model int, x float, y float, z float") createVehicle(model, x, y, z) end addCommandHandler("createvehicle", createVehicleForPlayer, false, false) addCommandHandler("createveh", createVehicleF
  5. vehicles\vehicles.lua:11: Bad argument @ 'createVehicle' [Expected number at argument 1, got nill] dbExec failed; (1) near "exist": syntax error outputChatBox("type") function createVehicleForPlayer(player, command, model) local db = exports.db:getdbconnection() local x ,y ,z = getElementPosition(player) y = 5 dbExec (db, "Create table if not exist vehicles id int, model int, x float, y float, z float") createVehicle(id, model, x, y, z) end addComma
  6. I have done that local db addEventHandler('onResourceStart', resourceRoot, function() db = dbConnect('sqlite', 'global.db') end) function getdbconnection() return db end Still dosent work vehicles\vehicles .lua:9: dbExec Failed; (1) no such table: vehicles
  7. dbexec failed no such tables: vehicles but i have created db sqlite and i have put in the right db to read from i just dosent write how can i fix it ? And I cant write changes in db sqlite , I cant click it its grey
  8. local db addEventHandler('onResourceStart', getResourceRootElement, function() db = dbConnect('sqlite', '/:global.db') end) function getdbconnection() return db end
  9. amiz

    how to fix it

    bad argument @ 'db exec ' [expected db-connection at argument 1, got nil
×
×
  • Create New...