vrp-framework / vrp-db-drivers Goto Github PK
View Code? Open in Web Editor NEWSome vRP database drivers.
License: MIT License
Some vRP database drivers.
License: MIT License
Hi, give me this error:
Error resuming coroutine: @vrp/lib/utils.lua:69: async wait(): Citizen.Await ret urned (nil) before the areturn call.
stack traceback:
[C]: in function 'error'
@vrp/lib/utils.lua:69: in function <@vrp/lib/utils.lua:63>
(...tail calls...)
[string "vrp/vRP.lua"]:131: in method 'registerDBDriver'
[string "vrp_ghmattimysql/init_vrp.lua"]:66: in function <[string "vrp_g hmattimysql/init_vrp.lua"]:65>
I have all the recent files, including his fix, and he gave me that error
I'll wait for an answer.
Would you be able to modify the db driver to be compatible with the new GHMattiMySQL (https://github.com/GHMatti/ghmattimysql)? :)
New:
-- METHODS
function DBDriver:onInit(cfg)
self.queries = {}
self.API = exports["ghmattimysql"]
if self.API then
self.API:Query("SELECT 1") -- multiple Buffer issue fix
end
return self.API ~= nil
end
Old:
-- METHODS
function DBDriver:onInit(cfg)
self.queries = {}
self.API = exports["GHMattiMySQL"]
if self.API then
self.API:Query("SELECT 1") -- multiple Buffer issue fix
end
return self.API ~= nil
end
https://imgur.com/a/i7zDQA5 Bonjour j'ai remarqué que vous parlez français c'est pourquoi je me permet de vous contacter en français suite à un problème de connexion à la base de donnée.
J'ai enregistrer les informations de la base donnée dans vrp est GHMattiMySQL j'ai ensuite copier les lignes de https://github.com/ImagicTheCat/fivem/tree/scheduler/data/shared/citizen/scripting/lua dans fx server mais j'ai toujours le problème.
The error shows after connecting to db:
[vRP] Connected to DB using driver "ghmattimysql".
Error resuming coroutine: @vrp/lib/utils.lua:45: error loading module vrp_ghmattimysql/init_vrp:@vrp/lib/utils.lua:69: async wait(): Citizen.Await returned (nil) before the areturn call.
stack traceback:
[C]: in function 'error'
@vrp/lib/utils.lua:69: in function <@vrp/lib/utils.lua:63>
(...tail calls...)
[string "vrp/vRP.lua"]:131: in method 'registerDBDriver'
[string "vrp_ghmattimysql/init_vrp.lua"]:65: in main chunk
[C]: in function 'xpcall'
@vrp/lib/utils.lua:40: in function 'module'
@vrp/base.lua:14: in local 'f'
[string "vrp/lib/Proxy.lua"]:59: in upvalue 'handler'
citizen:/scripting/lua/scheduler.lua:219: in function citizen:/scripting/lua/scheduler.lua:218
stack traceback:
[C]: in function 'error'
@vrp/lib/utils.lua:45: in function 'module'
@vrp/base.lua:14: in local 'f'
[string "vrp/lib/Proxy.lua"]:59: in upvalue 'handler'
citizen:/scripting/lua/scheduler.lua:219: in function citizen:/scripting/lua/scheduler.lua:218
Hi,
I just set up a server using vrp_ghmattimysql-js and everything was working on the first start (with empty database) until I restarted it. I then got this error: SCRIPT ERROR: [string "vrp_ghmattimysql-js/init_vrp.lua"]:31: attempt to index a nil value (local 'data')
Then I can't reconnect to the server as it hangs on Loading player data. The only way I found to make it work is to drop the database then recreate it.
Here's more context:
[ghmattimysql] [SUCCESS] Database server connection established.
Sending heartbeat to https://servers-ingress-live.fivem.net/ingress
Authenticating with Nucleus...
<-- (49) OkPacket {
fieldCount: 0,
affectedRows: 0,
insertId: 0,
serverStatus: 10,
warningCount: 1,
message: '',
protocol41: true,
changedRows: 0
}
<-- (49) OkPacket {
fieldCount: 0,
affectedRows: 0,
insertId: 0,
serverStatus: 10,
warningCount: 1,
message: '',
protocol41: true,
changedRows: 0
}
<-- (49) OkPacket {
fieldCount: 0,
affectedRows: 0,
insertId: 0,
serverStatus: 10,
warningCount: 1,
message: '',
protocol41: true,
changedRows: 0
}
<-- (49) OkPacket {
fieldCount: 0,
affectedRows: 0,
insertId: 0,
serverStatus: 10,
warningCount: 1,
message: '',
protocol41: true,
changedRows: 0
}
<-- (49) OkPacket {
fieldCount: 0,
affectedRows: 0,
insertId: 0,
serverStatus: 10,
warningCount: 1,
message: '',
protocol41: true,
changedRows: 0
}
<-- (49) OkPacket {
fieldCount: 0,
affectedRows: 0,
insertId: 0,
serverStatus: 10,
warningCount: 1,
message: '',
protocol41: true,
changedRows: 0
}
<-- (49) OkPacket {
fieldCount: 0,
affectedRows: 0,
insertId: 0,
serverStatus: 2,
warningCount: 1,
message: '',
protocol41: true,
changedRows: 0
}
[MariaDB:10.4.13-MariaDB] [WARNING] [vrp] [4327ms] CREATE TABLE IF NOT EXISTS vrp_users(
id INTEGER AUTO_INCREMENT,
whitelisted BOOLEAN,
banned BOOLEAN,
CONSTRAINT pk_user PRIMARY KEY(id)
);
CREATE TABLE IF NOT EXISTS vrp_user_ids(
identifier VARCHAR(100),
user_id INTEGER,
CONSTRAINT pk_user_ids PRIMARY KEY(identifier),
CONSTRAINT fk_user_ids_users FOREIGN KEY(user_id) REFERENCES vrp_users(id) ON DELETE CASCADE
);
CREATE TABLE IF NOT EXISTS vrp_characters(
id INTEGER AUTO_INCREMENT,
user_id INTEGER,
CONSTRAINT pk_characters PRIMARY KEY(id),
CONSTRAINT fk_characters_users FOREIGN KEY(user_id) REFERENCES vrp_users(id) ON DELETE CASCADE
);
CREATE TABLE IF NOT EXISTS vrp_user_data(
user_id INTEGER,
dkey VARCHAR(100),
dvalue BLOB,
CONSTRAINT pk_user_data PRIMARY KEY(user_id,dkey),
CONSTRAINT fk_user_data_users FOREIGN KEY(user_id) REFERENCES vrp_users(id) ON DELETE CASCADE
);
CREATE TABLE IF NOT EXISTS vrp_character_data(
character_id INTEGER,
dkey VARCHAR(100),
dvalue BLOB,
CONSTRAINT pk_character_data PRIMARY KEY(character_id,dkey),
CONSTRAINT fk_character_data_characters FOREIGN KEY(character_id) REFERENCES vrp_characters(id) ON DELETE CASCADE
);
CREATE TABLE IF NOT EXISTS vrp_server_data(
id VARCHAR(100),
dkey VARCHAR(100),
dvalue BLOB,
CONSTRAINT pk_server_data PRIMARY KEY(id, dkey)
);
CREATE TABLE IF NOT EXISTS vrp_global_data(
dkey VARCHAR(100),
dvalue BLOB,
CONSTRAINT pk_global_data PRIMARY KEY(dkey)
);
: []
server thread hitch warning: timer interval of 3543 milliseconds
--> (48) ComPingPacket { command: 14 }
<-- (48) OkPacket {
fieldCount: 0,
affectedRows: 0,
insertId: 0,
serverStatus: 2,
warningCount: 0,
message: '',
protocol41: true,
changedRows: 0
}
--> (48) ComQueryPacket {
command: 3,
sql: ' CREATE TABLE IF NOT EXISTS vrp_character_identities(\n' +
' character_id INTEGER,\n' +
' registration VARCHAR(20),\n' +
' phone VARCHAR(20),\n' +
' firstname VARCHAR(50),\n' +
' name VARCHAR(50),\n' +
' age INTEGER,\n' +
' CONSTRAINT pk_character_identities PRIMARY KEY(character_id),\n' +
' CONSTRAINT fk_character_identities_characters FOREIGN KEY(character_id) REFERENCES vrp_characters(id) ON DELETE CASCADE,\n' +
' INDEX(registration),\n' +
' INDEX(phone)\n' +
' );\n' +
' '
}
<-- (48) OkPacket {
fieldCount: 0,
affectedRows: 0,
insertId: 0,
serverStatus: 2,
warningCount: 1,
message: '',
protocol41: true,
changedRows: 0
}
[MariaDB:10.4.13-MariaDB] [vrp] [4ms] CREATE TABLE IF NOT EXISTS vrp_character_identities(
character_id INTEGER,
registration VARCHAR(20),
phone VARCHAR(20),
firstname VARCHAR(50),
name VARCHAR(50),
age INTEGER,
CONSTRAINT pk_character_identities PRIMARY KEY(character_id),
CONSTRAINT fk_character_identities_characters FOREIGN KEY(character_id) REFERENCES vrp_characters(id) ON DELETE CASCADE,
INDEX(registration),
INDEX(phone)
);
: []
--> (49) ComPingPacket { command: 14 }
<-- (49) OkPacket {
fieldCount: 0,
affectedRows: 0,
insertId: 0,
serverStatus: 2,
warningCount: 0,
message: '',
protocol41: true,
changedRows: 0
}
--> (49) ComQueryPacket {
command: 3,
sql: "SELECT dvalue FROM vrp_server_data WHERE id = 'deuxmetrescubes' AND dkey = 'vRP:hidden_transformers'"
}
<-- (49) ResultSetHeaderPacket { fieldCount: 1 }
<-- (49) FieldPacket {
catalog: 'def',
db: 'fivem',
table: 'vrp_server_data',
orgTable: 'vrp_server_data',
name: 'dvalue',
orgName: 'dvalue',
charsetNr: 63,
length: 65535,
type: 252,
flags: 144,
decimals: 0,
default: undefined,
zeroFill: false,
protocol41: true
}
<-- (49) EofPacket {
fieldCount: 254,
warningCount: 0,
serverStatus: 2,
protocol41: true
}
<-- (49) RowDataPacket {
dvalue: [
131, 170, 87, 101, 101, 100, 32, 102, 105, 101, 108, 100,
130, 168, 112, 111, 115, 105, 116, 105, 111, 110, 147, 203,
64, 161, 96, 97, 192, 0, 0, 0, 203, 64, 181, 200,
241, 64, 0, 0, 0, 203, 64, 74, 236, 90, 64, 0,
0, 3, 169, 116, 105, 109, 101, 115, 116, 97, 109, 112,
206, 94, 236, 26, 214, 175, 87, 101, 101, 100, 32, 112,
114, 111, 99, 101, 115, 115, 105, 110, 103, 130, 168, 112,
111, 115, 105, 116, 105, 111, 110, 147, 203, 64, 160, 213,
180, 0, 0, 0,
... 99 more items
]
}
<-- (49) EofPacket {
fieldCount: 254,
warningCount: 0,
serverStatus: 2,
protocol41: true
}
[MariaDB:10.4.13-MariaDB] [vrp] [6ms] SELECT dvalue FROM vrp_server_data WHERE id = ? AND dkey = ? : ["deuxmetrescubes","vRP:hidden_transformers"]
SCRIPT ERROR: [string "vrp_ghmattimysql-js/init_vrp.lua"]:8: invalid value (nil) at index 1 in table for 'concat'
> blob2string (rp_ghmattimysql-js/init_vrp.lua:8)
> ref (rp_ghmattimysql-js/init_vrp.lua:45)
> (@ghmattimysql/ghmattimysql-server.js:1)
Can you make a tutorial how to use this resource? I mean I tryed to use it but i get erros like :
https://gyazo.com/bc99a50f8c1844cbbb4f9c68bb5a6e58
Could you help me?>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.