#error with qb target using traders script

1 messages · Page 1 of 1 (latest)

fiery spade
#

Any idea what this could mean?

zinc belfry
#

What did you change in the cw trader/trade scripts?

fiery spade
#

the trade script isn't erroring, just this one seemingly

zinc belfry
#

Yeah but they work together. Does this happen on all trades or one specific one?

fiery spade
#

It's pretty much all of them since I only have 2 traders set up. I third eye them, but get no prompt for anything

#

seems the target is just broken

#

just appears AddTargetEntity is not functioning

zinc belfry
#

Using an old or new qb target version?

fiery spade
#

I'm not quite sure - I'm using a no pixel inspired ver of it, but whether or not it's latest, or outdated I have no clue sadly - I apologize for that 😦

zinc belfry
#

Could you try with a normal version of qb-target?

#

Just to make sure it's not that script that's causing it

fiery spade
#

I sure can, I can also send the area of the script it's erroring at currently if that's of any help

#

what's odd is there's 2 of these funcs?

#

not sure if it's normal

zinc belfry
#

Prob wont help much since I haven't used QB target for years LuL

#

Seems like it's the same as qb target tho

fiery spade
#

what's interesting, is removing the top func there changes my error to this

#

so it must recognize it's there, it's just finding nil

zinc belfry
#

can you send the trade you ar trying? to use

#

like the trade in config.lua for cw trade

fiery spade
#

the comma placement on the items is odd in that pic, but it's on purpose (just throwing shit at the wall and hoping it sticks lol)

#

but no matter what I change, same error

zinc belfry
#

are you using cw-tokens?

fiery spade
#

I am, yes

zinc belfry
#

Can you try a trade without the tokenValue

fiery spade
#

still the same error

zinc belfry
#

Adn the trader youre trying to use has the tradeNames added to them?

fiery spade
#

Yeah I do believe so - but it's also possible I made a mistake maybe?

zinc belfry
#

Try setting Config.SecretTrades to false in the trader config

#

Maybe Qb target can't handle empty tables

fiery spade
#

yeah, that's already set too 😦

zinc belfry
#

Do you have the token on you to do the trade?

fiery spade
#

I do, yeah

zinc belfry
#

Alright then I have no idea.

Try with a normal qb target

fiery spade
#

still not working sadly

#

if it's any help, removing the comma off the end of traderped here, does return a diff error

#

and removing traderped entirely, gives the old error

zinc belfry
#

Yeah if you remove that comma you break the entire script

#

hahah

#

add a print(json.encode(getOptions(ped), {indent=true}) on line 183

fiery spade
zinc belfry
#

It's missing a ) at the end

#

should be
print(json.encode(getOptions(ped), {indent=true}))

fiery spade
#

did fix that, but the same error

zinc belfry
#

What does is print?

fiery spade
zinc belfry
#

Oh

#

yeah

#

in that case I'm stumped

#

unless you've accidentally changed some code then I don't know what'd even cause that

fiery spade
#

it must be some kind of issue with my qb target ultimately

#

idk what

#

but I appreciate you trying to help

zinc belfry
#

Yeah I use ox-taget, and I don't experience that error.

#

Try reinstalling the trading scripts just to be sure

fiery spade
#

hmm

#

question: where is traderped initialized?

zinc belfry
#

scroll up a couple of lines from where the export to qb target is

fiery spade
#

ah

smoky scaffold
#

Where is traders in your load order, is it after target?

#

Cuz while I’ve been outta the game for a bit. But It’s failing to call the export. So makes me think target loads after traders

#

@fiery spade