#cw-trade and cw-trader

1 messages · Page 1 of 1 (latest)

glass spruce
#

I cannot get the script to work. The PED shows, but I don't get any prompt to open the store.

  1. Check your logs, both client and server side.
    Are there any errors?

SCRIPT ERROR: @cw-trader/client/client.lua:99: attempt to concatenate a nil value (field 'tradeLabel')

  1. When did the error occur?

This happened when starting/restarting the cw-trader resource.

  1. Did you change anything in the config?

Yes.

  1. If you've been editing the Config:
    CHECK FOR MISSING COMMAS!!

This is not the issue

  1. Did you change anything in the client/server side code?

  2. Enable debug and recreate the error. We'll most likely need these print outs to help you debug. (can be done in our Configs).
    Do these print outs give a hint? Maybe try to read them and find the issue yourself before posting.

Nothing helped here.

  1. Do you have any other scripts that might have and impact on the issue?
    Think REALLY hard, and then go verify this before you post

I can't think of any that would conflict at this time.

  1. If any items, did you add all the items?
    This includes ALL items mentioned in the Config also, not just from the readme (extra important for CW-Crafting that all of them exist)

This is good to go

  1. If you got errors: Read the actual error message.
    Check the file and line where the error message mentions. Consider if this could be due to another script. Maybe you use a different inventory system, or maybe another payment system

  1. Include AS MUCH information as you can.
    If all you can bring is "It's not working" then please fuck off. Be specific. Exactly what did you do to cause the error. If we can't repeat it we most likely can't help.

Originally I edited the script prior to installing it. I found this and wanted to use it as a "Supporter Store," a place where my monthly subscribers can receive a special currency to get specific items available only to them. So I redid cw-trade and cw-trader with just my items. I could not get the pawn to show.

There was an fxmanifest issue coming up in the console, and I looked and realized there was no server.lua in the cw-trader folder. I copied the server folder from cw-trade over to cw-trader to see if it would fix any issues. It went in the server okay, but I couldn't get the trader to actually open any menu or even get a prompt to open the menu.

I looked at the F8 and there was an error as listed above: SCRIPT ERROR: @cw-trader/client/client.lua:99: attempt to concatenate a nil value (field 'tradeLabel')

Still unsure why nothing was working, I installed the script as it came and got immediate errors for the fxmanifest and it crashed the server.

  1. Did you remove the "-main" from the folder name??
    If no, then do so.

Yes.

  1. We only support OX and QB inventory. If you set your inventory to anything else in the config then that's the issue.

I use qb-inventory.

honest cedar
#

The error SCRIPT ERROR: @cw-trader/client/client.lua:99: attempt to concatenate a nil value (field 'tradeLabel') seems to indicate that one of your traders is missing it's tradeLabel in a multi trade setup 🤔
The examples are the ones that have a trades property, like weedGuy and shadyGuy

glass spruce
#

Should there be a server folder with a server.lua in both cw-trade and cw-trader?

#

If not then can I remove that from the fxmanifest?

#

As it sits I only have it in cw-trades

honest cedar
#

Yeah traders has no server file

glass spruce
#

Cool I will look into this further thank you for your help!

honest cedar
#

Traders only handle the npcs basically, and Trades is the exhanges. It's separated like that because Trades can be used from other scripts also that way

glass spruce
#

I’m not much of a developer, and my head developer decided to go off and do other things. So I’m doing my best haha.

honest cedar
#

As long as the paid gear isn't giving those players benifits over other players (because that'd make the server kinda shit imo kek ) then yeah, sounds pretty good.

cw-trade is bascially set up to handle interchanges between items. Trade x for y. So you can set it up to be used for anything where your player has one item and it should be traded into another. For example you could use trades to have payouts for a mission/job where you turn in (say) a bag of stolen pistachios to a dude and he gives you a bottle of vodka for it in return

glass spruce
#

It’s a clout thing haha

#

This actually works really well for some other things I have in mind. Thank you again!