Jump to content

[Release] Advanced Trading 2.1 !UPDATED!


Zupa

Recommended Posts

How to I add an exception? I opened the AHconfigAdvanced.sqf and the advanced trading idd is already there (711197)

/*  ALLOWED Custom Dialogs "_ALLOWED_Dialogs" are only used if you have "_CUD =  true;"  */
/*  If you want install custom scripts using dialog windows, you can add IDD numbers  */
/*  from the custom script's desc.h file included through MPMIssions/description.ext  */
_ALLOWED_Dialogs = [-1,106,2200,6900,6901,6902,6903,420420,41144,711194];
//	-1			Epoch Safe/Lockbox Keycode UI
//	106		Inventory (Gear)
//	2200		Blood Test
//	6900,6901,6902,6903	New Player (select Gender and such things)
//	420420	Epoch Trader
//	41144		Epoch Door Keycode UI
//	129		Diary
//	666,667	Clay Car Radio
//	4444		Radio Communication
//	65431,65432,65433,65434,65440,65441,65442		R3F ARTY Lift/Tow/Transport.
//	711194	Plot Management	(http://epochmod.com/forum/index.php?/topic/16166-release-plot-management/)
_ALLOWED_Dialogs = _ALLOWED_Dialogs + [81000,20001,20002,20003,20004,20005,20006,118338,118339,711197,711195]; // adding some others from community addons

I then tried adding the idd to the first line of allowed dialogs and went to the AHconfigSettings.sqf and set "_CUD = true;" at that point I was unable to enter the lobby of the server and it said "Wait for host".

I'm not sure what exactly to do at this point. Please help.

Link to comment
Share on other sites

You don't need to add anything to infistar. It has meanwhile been added in the newest versions. :) just remove that extra number

Remove what number? What the code I posted shows is what I currently have and other players on the server cannot open the advanced trading window when they click on the scroll option.

Link to comment
Share on other sites

  • 2 weeks later...

Yes I was able to fix it. Go to your AH.sqf and go to line 57 and add the Advanced trading number to the allowed dialogs. Also make sure "_BHF" is false. Once you do that go to you AHconfig.sqf and literally do the same thing(Make sure "_BHF" is false, and you add advanced trading to the allowed dialogs). That's what worked for me.

Link to comment
Share on other sites

i have Advanced Trading from Zupa, i change in init.sqf to     Z_MoneyVariable = "headShots"; // Change this to whichever currency You are using.

 

but when i sell the items, items are gone, but no coins for me.

 

Any ideas?

 

no rpt errors

Link to comment
Share on other sites

  • 1 month later...

Fresh install starting with the Single Currency & Banking 1.1  

 

The only other thing on the server is Adv. Trader. 

 

The item will sell, but no gold will be given.  Also when I try to buy an item, it says I don't have enough gold.

 

Getting this in my client side RPT.

Error in expression <call server_hiveReadWrite;



} else {

private ["_part_out","_part_in","_qty_ou>
  Error position: <private ["_part_out","_part_in","_qty_ou>
  Error Local variable in global space
File mpmissions\__CUR_MP.Chernarus\gold\trade_items.sqf, line 137
Error in expression <_CUR_MP.Chernarus\gold\trade_items.sqf"
private ["_part_out","_part_in","_qty_ou>
  Error position: <private ["_part_out","_part_in","_qty_ou>
  Error Local variable in global space
File mpmissions\__CUR_MP.Chernarus\gold\trade_items.sqf, line 1
Here is the 'trade_items.sqf'  around the line they are calling the error in:

Here is the lines they are calling the errors around in the gold\trade_items.sqf

private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_textPartIn","_textPartOut","_needed","_started","_finished","_animState","_isMedic","_total_parts_out","_abort","_removed","_tradeCounter","_next_highest_bar","_third_highest_bar","_next_highest_conv","_third_highest_conv","_third_parts_out_raw","_third_parts_out","_remainder","_next_parts_out_raw","_next_parts_out","player","_traderID","_total_trades"];
private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_textPartIn","_textPartOut","_needed","_started","_finished","_animState","_isMedic","_total_parts_out","_abort","_removed","_tradeCounter","_next_highest_bar","_third_highest_bar","_next_highest_conv","_third_highest_conv","_third_parts_out_raw","_third_parts_out","_remainder","_next_parts_out_raw","_next_parts_out","player","_traderID","_total_trades"];

 

The HUD for Adv. trader comes up, and everything seems to work fine, but I can't buy items, even when I have enough gold, and when I sell items, no gold is returned to the player.

 

What am I missing?!? 

 

*EDIT*   I'm using 999, but i'm not sure what variables need to be changed.   I added to these to my variable.sqf list.  

        s_givemoney_dialog = -1;
        s_bank_dialog = -1;
        s_bank_dialog2 = -1;
        s_player_packOBJ = -1

Thanks for taking the time to read this. 

Link to comment
Share on other sites

Both of your guys's problems have been answered multiple times on either the Advanced Trading forum, or the appropriate Single Currency forum. But, read below and I'll once again try to give the answers that multiple people, including myself, have already given :) Also, the complete .sqf files for the corresponding mod, are very useful to post. Just make sure you put them inside a spoiler, and they are formatting the same way as when looking at them, in say, Notepad++.

i have Advanced Trading from Zupa, i change in init.sqf to     Z_MoneyVariable = "headShots"; // Change this to whichever currency You are using.

 

but when i sell the items, items are gone, but no coins for me.

 

Any ideas?

 

no rpt errors

 

First off, does Advanced Trading work, but you don't get the coins from it, or, do you not get coins from Advanced Trading and from normal trader menu? I am certain you don't have the variable set right in both places. Also, try "HeadshotsZ" for the variable instead. If you look at your character table in you database, what ever the headshots column is named as, is what you want to use. In my table, which should be using the default values, it is "HeadshotsZ".

If i remember correctly, there is a spot in the advanced trading script where you need to set it, and in the normal trader script. I also recall swapping out (I believe it was) fn_selfActions.sqf with a Single currency version. My server has been off for a month or so since I have been doing some job training, but I do still have the files, if I really need to look at them and tell you for sure.

 

Fresh install starting with the Single Currency & Banking 1.1  

 

The only other thing on the server is Adv. Trader. 

 

The item will sell, but no gold will be given.  Also when I try to buy an item, it says I don't have enough gold.

 

Getting this in my client side RPT.

Error in expression <call server_hiveReadWrite;



} else {

private ["_part_out","_part_in","_qty_ou>
  Error position: <private ["_part_out","_part_in","_qty_ou>
  Error Local variable in global space
File mpmissions\__CUR_MP.Chernarus\gold\trade_items.sqf, line 137
Error in expression <_CUR_MP.Chernarus\gold\trade_items.sqf"
private ["_part_out","_part_in","_qty_ou>
  Error position: <private ["_part_out","_part_in","_qty_ou>
  Error Local variable in global space
File mpmissions\__CUR_MP.Chernarus\gold\trade_items.sqf, line 1
Here is the 'trade_items.sqf'  around the line they are calling the error in:

Here is the lines they are calling the errors around in the gold\trade_items.sqf

private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_textPartIn","_textPartOut","_needed","_started","_finished","_animState","_isMedic","_total_parts_out","_abort","_removed","_tradeCounter","_next_highest_bar","_third_highest_bar","_next_highest_conv","_third_highest_conv","_third_parts_out_raw","_third_parts_out","_remainder","_next_parts_out_raw","_next_parts_out","player","_traderID","_total_trades"];
private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_textPartIn","_textPartOut","_needed","_started","_finished","_animState","_isMedic","_total_parts_out","_abort","_removed","_tradeCounter","_next_highest_bar","_third_highest_bar","_next_highest_conv","_third_highest_conv","_third_parts_out_raw","_third_parts_out","_remainder","_next_parts_out_raw","_next_parts_out","player","_traderID","_total_trades"];

 

The HUD for Adv. trader comes up, and everything seems to work fine, but I can't buy items, even when I have enough gold, and when I sell items, no gold is returned to the player.

 

What am I missing?!? 

 

*EDIT*   I'm using 999, but i'm not sure what variables need to be changed.   I added to these to my variable.sqf list.  

        s_givemoney_dialog = -1;
        s_bank_dialog = -1;
        s_bank_dialog2 = -1;
        s_player_packOBJ = -1

Thanks for taking the time to read this. 

 

You need to change the currency variable, to the variable name used for the money. For instance, if you have a single currency (ie. COINS not gold) with banking (ie ATMs, bank, etc), then the typical variable name uses "HeadshotsZ". If it is Zupa's Single Currency 1.1 with storage (no global banking), then it typically uses "cashMoney". But, other versions may use different variable names.

The important thing, is to check your character table in the database and use the headshots column (exactly as it appears with the proper capital letters), if it is global banking. That typically works.

 

I can pretty much guarantee that for anyone not receiving coins from selling, or that are told they dont have enough money when trying to buy, it is because your scripts have the wrong variable name in them. That makes the script not know how to find your money, or where to put it when giving it to you.

 

Reply back if ya still can't figure it out....just make sure to post the entire files, and not just the lines you think are the problem.

Link to comment
Share on other sites

It looks like the 999 version is using headShots. So you may want to check the entire getvariable is there. For instance, getVariable ["headShots",0]. So make sure you have the ,0] on it.

I'm kinda guessing as to what you should have though, because I don't have your actual files to look at. I am just looking through the code of the SC script Zupa has on his github.

Also, depending of where you are looking, it may be slightly different. For instance, when it is setting the variable, it could be like this, player setVariable ["headShots", _qtychange , true];

Link to comment
Share on other sites

im using this mod with single currency and plot management and when i go in game to click on advanced trading nothing happens and i know why its because im not calling these (below) in the description.ext but when i call them it conflickts with what im assuming is SC and Plot management because the dialogs are the same anyone know how to fix this (also using souls SC)

 

#include "zupa\advancedTrading\ZSCdefines.hpp" // if u don't have it from ZSC
#include "zupa\advancedTrading\advancedTrading.hpp"

 

Also sorry if im stupid and doing this completely wrong that is also a possibility.

Link to comment
Share on other sites

The advancedTrading.hpp is what brings up the dialog so that you can use the menu, if you already have a defines then just exclude that one and add your other line in there.

Ok so when i click on the option ingame it says "Resource AdvancedTrading not found" anyone know what this means

Link to comment
Share on other sites

  • 2 weeks later...

So figured out what was wrong i kinda left that script alone for a while and didn't have the #include in the description.ext but now i remember why i had it out it was because i kept getting this error and im pretty confused on it.

 

ErrorMessage: File mpmissions\DayZ_Epoch_11.Chernarus\Scripts\advancedTrading\advancedTrading.hpp, line 0: .AT_Zupa_BlueButton: Undefined base class 'ZSC_RscButtonMenu5'

Link to comment
Share on other sites

Means you messed up. Merge your files.

 

 

So figured out what was wrong i kinda left that script alone for a while and didn't have the #include in the description.ext but now i remember why i had it out it was because i kept getting this error and im pretty confused on it.

 

ErrorMessage: File mpmissions\DayZ_Epoch_11.Chernarus\Scripts\advancedTrading\advancedTrading.hpp, line 0: .AT_Zupa_BlueButton: Undefined base class 'ZSC_RscButtonMenu5'

 

See above......lol. Seriously though, its cause you messed up some where. I can't really say where, because I don't have your files.

Link to comment
Share on other sites

Some planned changes:

 

  • Search input to filter items on name
  • Info display of selected item ( Bigger picture, prise, config details)
  • Redesigning the window dialog.

^ Might add non SC support if it doesn't give me troubles too much.

 

 

Feel free to place some requests now, and i'll see if possible and legitable :p

Link to comment
Share on other sites

 

 

 

Feel free to place some requests now, and i'll see if possible and legitable :P

 

 

Can you possibly update the file you posted in Advanced Alchemical Building so it doesn't conflict with Advanced Trading / SC3.0 / Door Management / Plot Management? Please? :) 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...