Advertisement
Guest User

error

a guest
Feb 19th, 2020
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.45 KB | None | 0 0
  1. SCRIPT ERROR: @vrp_lscustoms/server.lua:116: invalid vector field: costs
  2. SCRIPT ERROR: @vrp_lscustoms/server.lua:116: invalid vector field: costs
  3. SCRIPT ERROR: @vrp_lscustoms/server.lua:116: invalid vector field: costs
  4. SCRIPT ERROR: @vrp_lscustoms/server.lua:116: invalid vector field: costs
  5. SCRIPT ERROR: @vrp_lscustoms/server.lua:116: invalid vector field: costs
  6. SCRIPT ERROR: @vrp_lscustoms/server.lua:116: invalid vector field: costs
  7. SCRIPT ERROR: @vrp_lscustoms/server.lua:116: invalid vector field: costs
  8. SCRIPT ERROR: @vrp_lscustoms/server.lua:116: invalid vector field: costs
  9. SCRIPT ERROR: @vrp_lscustoms/server.lua:116: invalid vector field: costs
  10. SCRIPT ERROR: @vrp_lscustoms/server.lua:116: invalid vector field: costs
  11. server thread hitch warning: timer interval of 293 milliseconds
  12. Sending heartbeat to https://servers-ingress-live.fivem.net/ingress
  13. InvokeNative: execution failed: Argument at index 1 was null.
  14. SCRIPT ERROR: Execution of native 000000002f7a49e6 in script host failed.
  15. > callback (@vrp_dmvschool/server.lua:94)
  16. > finish (@vrp/lib/utils.lua:43)
  17. > task (@vrp/lib/utils.lua:47)
  18. > cb (@vrp_dmvschool/server.lua:70)
  19. > handler (- begin MySQL module
  20. local MySQL = {}
  21.  
  22. MySQL.debug = false
  23. local dpaths = {}
  24.  
  25. local tasks = {}
  26.  
  27. --[[
  28. local function tick()
  29. SetTimeout(1, function() -- protect errors from breaking the loop
  30. SetTimeout(1000, tick)
  31.  
  32. local rmtasks = {}
  33. for id,cb in pairs(tasks) do
  34. local r = exports.vrp_mysql:checkTask(id)
  35. if r.status == 1 then
  36. cb(r.rows,r.affected) -- rows, affected
  37. table.insert(rmtasks, id)
  38. elseif r.status == -1 then
  39. print("[vRP] task "..id.." failed.")
  40. table.insert(rmtasks, id)
  41. end
  42. end
  43.  
  44. -- remove done tasks
  45. for k,v in pairs(rmtasks) do
  46. tasks[v] = nil
  47. end
  48. end)
  49. end
  50. tick()
  51. --]]
  52.  
  53. AddEventHandler("vRP:MySQL_task", function(task_id, data)
  54. -- print("vRP:MySQL_task "..task_id)
  55. local cb = tasks[task_id]
  56. if data.status == 1 then
  57. if cb then
  58. if data.mode == 0 then
  59. cb(data.affected or 0)
  60. elseif data.mode == 1 then
  61. cb(data.scalar or 0)
  62. elseif data.mode == 2 then
  63. cb(data.rows or {}, data.affected or 0) -- rows, affected
  64. end
  65. end
  66. elseif data.status == -1 then
  67. print("[vRP] task "..task_id.." failed.")
  68. end
  69.  
  70. tasks[task_id] = nil
  71.  
  72. if MySQL.debug and dpaths[task_id] then
  73. print("[vRP] MySQL end query "..dpaths[task_id].." ("..task_id..")")
  74. dpaths[task_id] = nil
  75. end
  76. end)
  77.  
  78. local task_id = -1
  79. AddEventHandler("vRP:MySQL_taskid", function(_task_id)
  80. -- print("vRP:MySQL_taskid ".._task_id)
  81. task_id = _task_id
  82. end)
  83.  
  84. -- host can be "host" or "host:port"
  85. function MySQL.createConnection(name,host,user,password,db,debug)
  86. -- print("[vRP] try to create connection "..name)
  87. -- parse port in host as "ip:port"
  88. local host_parts = splitString(host,":")
  89. if #host_parts >= 2 then
  90. host = host_parts[1]..";port="..host_parts[2]
  91. end
  92.  
  93. local config = "server="..host..";uid="..user..";pwd="..password..";database="..db..";"
  94.  
  95. -- TriggerEvent("vRP:MySQL:createConnection", name, config)
  96. exports.vrp_mysql:createConnection(name, config)
  97. end
  98.  
  99. function MySQL.createCommand(path, query)
  100. -- print("[vRP] try to create command "..path)
  101. -- TriggerEvent("vRP:MySQL:createCommand", path, query)
  102. exports.vrp_mysql:createCommand(path, query)
  103. end
  104.  
  105. -- generic query
  106. function MySQL._query(path, args, mode, cb)
  107. -- TriggerEvent("vRP:MySQL:query", path, args)
  108. if not (type(args) == "table") then
  109. args = {}
  110. end
  111.  
  112. -- force args to be a C# dictionary
  113. args._none = " "
  114.  
  115. -- exports.vrp_mysql:query(path, args)
  116. -- print("[vRP] try to query "..path.." id "..task_id)
  117. TriggerEvent("vRP:MySQL_query", path, args, mode)
  118. if MySQL.debug then
  119. print("[vRP] MySQL begin query (m"..mode..") "..path.." ("..task_id..")")
  120. dpaths[task_id] = path
  121. end
  122.  
  123. tasks[task_id] = cb
  124. end
  125.  
  126. -- do a query (multiple rows)
  127. --- cb(rows, affected)
  128. function MySQL.query(path, args, cb)
  129. MySQL._query(path, args, 2, cb)
  130. end
  131.  
  132. -- do a scalar query (one row, one column)
  133. --- cb(scalar)
  134. function MySQL.scalar(path, args, cb)
  135. MySQL._query(path, args, 1, cb)
  136. end
  137.  
  138. -- do a execute query (no results)
  139. --- cb(affected)
  140. function MySQL.execute(path, args, cb)
  141. MySQL._query(path, args, 0, cb)
  142. end
  143.  
  144. -- return module
  145. return MySQL
  146. :45)
  147. > void vRP.MySQL.e_tick() (@vrp_mysql/mysql.net.dll:0)
  148. > fn (@vrp_mysql/init.lua:3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement