[ESX/QB] KFines - Nice Traffic Tickets with option to pay later!
KFines is advanced Traffic Tickets system that allows creating tickets for players by cops, that can be paid later (by default, player needs to pay it in 3 days). If player don’t pay ticket after configured time, script will take money with additional fee (by default 25%).
[ script:oxmysql] [10.4.27-MariaDB] Database server connection established!
[ script:oxmysql] Error: KFines-main was unable to execute a query!
[ script:oxmysql] Query: SELECT id FROM kfines WHERE payUntil < CONVERT_TZ(NOW(), ‘+00:00’, ?) AND paid=false
[ script:oxmysql] [“+02:00”]
[ script:oxmysql] Table ‘esxlegacy_c3f7ec.kfines’ doesn’t exist
[ script:ox_inventory] [info] Database contains 34 items.
[ script:oxmysql] Error: KFines-main was unable to execute a query!
[ script:oxmysql] Query: CREATE TABLE IF NOT EXISTS kfines (id INT NOT NULL AUTO_INCREMENT , copIdentifier TEXT NOT NULL, copName TEXT NOT NULL, copRank TEXT NOT NULL, copBadge TEXT NOT NULL, citizenIdentifier TEXT NULL, citizenName TEXT NOT NULL,citizenSex INT NOT NULL,citizenDOB TEXT NOT NULL, fine INT NOT NULL, reason TEXT NOT NULL, date TIMESTAMP NOT NULL, payUntil TIMESTAMP NOT NULL, signature TEXT NOT NULL, paid BOOLEAN NOT NULL DEFAULT FALSE, afterTime BOOLEAN NOT NULL DEFAULT FALSE, PRIMARY KEY (id)) ENGINE = InnoDB;
[ script:oxmysql] []
[ script:oxmysql] Invalid default value for ‘payUntil’
Hey, error Invalid default value for ‘payUntil’ is very strange bug, because payUntil doesn’t have default value. It can be something wrong with your db configuration. You can also try to add default value to it in script (server.lua), it will be sth like , payUntil TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP. I also noticed that you are using oxmysql and ox_inventory that are probable from ESX Legacy. I currently support only ESX 1.2
very good script but I meet this error, can you help me please
[ script:oxmysql] SCRIPT ERROR in promise (unhandled rejection): Error: KFines was unable to execute a query!
[ script:oxmysql] Table ‘qbcoreframework_385a0b.kfines’ doesn’t exist
[ script:oxmysql] SELECT id FROM kfines WHERE payUntil < CONVERT_TZ(NOW(), ‘+00:00’, ?) AND paid=false [“+02:00”]
[ script:oxmysql] > (@oxmysql/dist/build.js:21833)
[ script:oxmysql] > processTicksAndRejections (node:internal/process/task_queues:96)
[ script:oxmysql]
[ script:oxmysql] SCRIPT ERROR in promise (unhandled rejection): Error: KFines was unable to execute a query!
[ script:oxmysql] Invalid default value for ‘payUntil’
[ script:oxmysql] CREATE TABLE IF NOT EXISTS kfines (id INT NOT NULL AUTO_INCREMENT , copIdentifier TEXT NOT NULL, copName TEXT NOT NULL, copRank TEXT NOT NULL, copBadge TEXT NOT NULL, citizenIdentifier TEXT NULL, citizenName TEXT NOT NULL,citizenSex INT NOT NULL,citizenDOB TEXT NOT NULL, fine INT NOT NULL, reason TEXT NOT NULL, date TIMESTAMP NOT NULL, payUntil TIMESTAMP NOT NULL, signature TEXT NOT NULL, paid BOOLEAN NOT NULL DEFAULT FALSE, afterTime BOOLEAN NOT NULL DEFAULT FALSE, PRIMARY KEY (id)) ENGINE = InnoDB;
[ script:oxmysql] > (@oxmysql/dist/build.js:21833)
[ script:oxmysql] > processTicksAndRejections (node:internal/process/task_queues:96)