#qb-policejob

1 messages · Page 1 of 1 (latest)

valid bay
#

Script Name:

Error : Error: qb-policejob was unable to execute a query!
19:46:22 [ script:oxmysql] Query: DELETE FROM stashitems WHERE stash = 'policetrash'
19:46:22 [ script:oxmysql] []
19:46:22 [ script:oxmysql] Table 's62353_qbcore.stashitems' doesn't exist

Whats the issue your experiencing: script with policejob does not work

What was the last thing that changed: things in the config

What measures and steps have you taken to troubleshoot this issue: we tried to find it in the config and fix it but it didn't work

Video/screenshot: screenshot i send

slate elbow
#

your missing table from database

valid bay
#

how should I solve it please?

slate elbow
#
CREATE TABLE IF NOT EXISTS `stashitems` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `stash` varchar(255) NOT NULL DEFAULT '[]',
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`stash`),
  KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1;
#

run this thru heidisql

#

heres an executable SQL that will help

#

execute this and then test and you should be good

slate elbow
#

either do i

#

i cant read that im english 🙂

#

whys there an added line at the top

#

that shouldnt be there

valid bay
#

Error
Static Analysis:

1 errors were found during the analysis.

A new expression was found without a separator from the previous expression. (near "CREATE" at position 29)
SQL Query: Copy Documentation

SELECT * FROM stashitems CREATE TABLE IF NOT EXISTS stashitems ( id int(11) NOT NULL AUTO_INCREMENT, stash varchar(255) NOT NULL DEFAULT '[]', items longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, PRIMARY KEY (stash), KEY id (id) ) ENGINE=InnoDB AUTO_INCREMENT=1;

MySQL reports: Documentation

#1064 - Your syntax is a bit strange near 'CREATE TABLE IF NOT EXISTS stashitems (
id int(11) NOT NULL AUTO_INCR...' on line 2

slate elbow
#

remove the top line as that wasnt there

#

SELECT FROM * stashes

valid bay
#

ok i'll try it

valid bay
#

the table is created, then I wrote in it what you sent. But there is still an error in the console

slate elbow
#

huh?

valid bay
#

it shows that it is misspelled

slate elbow
#

cos that isnt what i sent u

#

u keep changing it for some reason

#
CREATE TABLE IF NOT EXISTS `stashitems` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `stash` varchar(255) NOT NULL DEFAULT '[]',
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`stash`),
  KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1;
jolly ocean
#

Just use what he sent you.
It's not hard to copy and paste the sql code.

#

@elder helm

elder helm
#

i do that and there is still an error in the console

slate elbow
#

Show me the error ur getting

elder helm
slate elbow
#

lol

#

just screenshot it and paste here

elder helm
#

here error and sql i have table

slate elbow
#

cos ur databse looks fucked if im honest

elder helm
#

why

#

so when I added it it should work right?

slate elbow
#

not looking at your database

#

use heidiSQL

#

its much easier to use

elder helm
#

its done bro thanks

slate elbow
#

what did u do?

elder helm
#

use app heidisql and I imported what you sent me

slate elbow
#

happy days

#

glad u sorted it

elder helm
#

thanks you very much bro

slate elbow
#

no worries

elder helm
#

Hi can i ask?

slate elbow
#

?

elder helm
#

i create a police boss menu

#

a restart server

#

and now when I select a character, I get a black screen and it doesn't want to load into the game.

slate elbow
#

by looks of the error above that looks like u have error in your jobs.lua

elder helm
#

and how do I solve it?

slate elbow
#

why do u have so many closing brackets for lol

#

try adding a } at the very bottom

#

remove the closing bracket from line 171

elder helm
#

okey i remove closing bracket from line 171

slate elbow
#

and add it at very bottom

#

line 186

elder helm
#

and should I leave the brackets on 184 183?

#

I still get a black screen after I select a character

elder helm
#

I tried deleting the lspd shelf and that's probably not the whole point, when I deleted it I still have a blackscreen

jolly ocean
elder helm
#

ERROR: [script:qb-multichara] > CheckPlayerData (@qb-core/server/player.lua:105)
13:10:52 [script:qb-multichara] > ref (@qb-core/server/player.lua:21)
13:10:52 [script:qb-multichara] > rawExecute (@oxmysql/dist/build.js:27186)
13:10:52 [script:qb-multichara] > processTicksAndRejections (node:internal/process/task_queues:96)
13:10:52 [script:qb-multichara]
13:10:52 [script:qb-multichara] > handler (@qb-multicharacter/server/main.lua:90)
13:10:52 [script:qb-multichara] > rawExecute (@oxmysql/dist/build.js:27186)
13:10:52 [script:qb-multichara] > processTicksAndRejections (node:internal/process/task_queues:96)

remote hinge
#

What is qb-core/server/player.lua:105

#

Go to the line your error references.

jolly ocean
# elder helm

Going by this and his bad screenshot I'd say he's still got an error with qbcore/shared/jobs.lua
@remote hinge

elder helm
remote hinge
#

Ok, so now think: why would that line throw an error? What is it referencing?

elder helm
#

that something is wrong with jobs?

remote hinge
#

Yes

elder helm
#

okey and now?

remote hinge
#

Revert your jobs back to the default - when you add a new one, use arrays properly. You don't seem to understanding the brackets.

elder helm
#

thanks bro

#

So how do I properly create a boss menu in jobs?

elder helm
#

i have this setting

#

but i not see boss menu

remote hinge
#

You need to expain things better. "I have this setting" doesn't mean anything to me.

#

What have you done, what are you expecting to work, what doesn't work.

elder helm
#

Well, I have what you sent me set up, but I still don't see the boss menu in the game.

remote hinge
#

Is your player set as a rank of that job that can access the boss menu?

elder helm
#

How do I set it up?

remote hinge
#

For example, set yourself as having the police job with a rank that can access the menu. You can see that in your shared jobs.

elder helm
#

yes i see

#

okey i do that thanks you bro

valid bay
#

hello can i ask for help I wanted to make cash as an item, I followed everything the video said, but this error popped up at me and I don't know what to do with it.