Jump to content

[Alpha Release] Single Currency 3.0 & Storage DEFAULT HIVE ( No global banking).


Recommended Posts

What about people who doesn't have ANY ERROR in the RTP but coins not saving???

 

They should check their files cus i'm pretty sure they are editing the wrong files or just editing them incorrectly.

 

Paste some diag_log in them files to see if they are even called 

 

then check client and server rpt's ( yes multiple rpt) for anything.

 

Also check your server-sql logs ( yes they excisit to) to see if the calls are correctly passed.

Link to comment
Share on other sites

They should check their files cus i'm pretty sure they are editing the wrong files or just editing them incorrectly.

 

Paste some diag_log in them files to see if they are even called 

 

then check client and server rpt's ( yes multiple rpt) for anything.

 

Also check your server-sql logs ( yes they excisit to) to see if the calls are correctly passed.

 

 

I'll Look odd its working perfectly on test server grrrrrr.

 

FIXED, I didn't wanna reinstall the script so i said fuck it and take my test server files and replace the whole thing. Work properly now.

Link to comment
Share on other sites

You can leave them as intentory if you like, you just have to make sure that any script you install that also uses those fields are ALSO using intentory. Almost everybody writing scripts has changed them to inventory, so just go through and change them all now and save some headache down the track.

Link to comment
Share on other sites

You can leave them as intentory if you like, you just have to make sure that any script you install that also uses those fields are ALSO using intentory. Almost everybody writing scripts has changed them to inventory, so just go through and change them all now and save some headache down the track.

i did change it to _inventory so i'm hoping this won't cause any conflicts

Link to comment
Share on other sites

There's something about the instructions I don't understand:

 

 

A 5 ) MAKE SURE 

_serverMonitor =     [] execVM "\z\addons\dayz_server\system\server_monitor.sqf";

this line is custom and doesnt have dayz_code in it. It should point at dayz_server or if u use another script to where ever that places it.

 

I don't understand. My init.sqf has execVM "\z\addons\dayz_code\system\server_monitor.sqf"; and I make changes to the server's dayz_server\system\server_monitor.sqf for other mods. Do I need to change that line so it has dayz_server instead of dayz_code? If so, why?

Link to comment
Share on other sites

Hi, I installed this about a week ago, and I've noticed that my money disappears out of my safe every day or two. I went through all the instructions again to make sure I didn't forget something, and I didn't. I was just wondering if anyone else had this issue and knew how to fix it, because I don't want my players money disappearing. I would really appreciate any help. Thanks.

Link to comment
Share on other sites

Alright everyone, I am tired of these coins getting removed randomly all the time from vaults so I decided to spend a few hours and take a look on how dayz epoch handles vaults and such. After searching around I found the problem to the coins not saving. Let me explain to the people that actually want to understand why it was happening and then I will post the fix.

 

Dayz epoch actually has 2 variants of the vaults, one in which is locked and one in which is unlocked. When a player unlocks the vault what is actually happening is all the variables that were stored onto that locked safe are saved to local variables, next the locked vault gets removed and a new unlocked variant is placed down in the exact same spot and in the same direction, after that the these variables from the old safe gets written to the new vault, (3 of the variables are actually calculated by finding the weapons, magazines and the backpacks of the safe and then places all the info on an array,which then get's called to the new vault to "fill" it up with the old loot). Now another variable called "bankMoney" is added from this mod to the vaults of your server(s). As you can remember about the unlock vault and the vault lock is one of the first things it does is get the variables from the old vault so it can apply them to the new vault. It grabs this variable "bankMoney" from the old one and attempts to write the new variable to the new vault.

 

Now there could be a bad glitch which involves people to take the money of the old vault before the new one get's places down, but this is "fixed" by one of the scripts, (The player_lockVault.sqf). I am sad to say that the way this was originally designed was absolute laziness as all the "fix" does is make the variable "bankMoney" to 0 before it is written to the database so if another player tries to take money when the player is locking the vault it would give them that there is not enough money in the vault. That is all fine and dandy, but if you take a look at this line PVDZE_log_lockUnlock = [player, _obj,true]; AND publicVariableServer "PVDZE_log_lockUnlock"; it basically calls the server to safe the inventory of the vault which also means the coins... but since they are now set to 0 you will get a big fat zero in your database, so when the player opens the vault or the server is restarted there will be nothing in the vault no matter if you put 10 coins to 200000 coins, so ya that needs to fixed...

 

BUT LUCKALLY I ALREADY DID! SO FOLLOW BELOW SO YOU CAN HAVE SOME GOOD OLD SAFES SAVING LIKE THEY SHOULD!

 

1) Go to your mission folder

2) If you don't have a custom player_lockVault and are using the zupa's varient go into your ZSC folder and search for it, if you ARE using one find your player_lockVault.sqf

3) Open player_lockVault.sqf

4) Search for _obj setVariable ["bankMoney", 0, true]; which is around line 42 and remove it

5) Search for _pos = _obj getVariable["OEMPos",(getposATL _obj)];

6) Add this below it:

 

sleep 1;
 
_objMoneyNew = _obj getVariable["bankMoney",0];
 
//Checks to see if the values have changed if they have the players will be punished
//cutText [format ["Old Coins: %1  New coins: %2",_objMoney,_objMoneyNew],"PLAIN"];
if(_objMoney != _objMoneyNew) exitWith {
_nearPlayers = _this nearEntities ["CAManBase", 2];
cutText ["We do not accept duping, you will now be punished", "PLAIN DOWN"];
{
removeAllWeapons _x;
removeBackpack _x; 
_x setVariable["cashMoney",0,true];
(vehicle _x) setVehicleAmmo 0;
    } forEach _nearPlayers;
s_player_lockvault = -1;
DZE_ActionInProgress = false;
};
 
This basically punishes the player if they attempting this dupe with a friend by removing all the gear in their inventory plus coins
 
7) Safe the file and test er out!
 
Just a note I am a pretty new scripter so I may of made some noob/shitty code. I may be completely wrong about all of this however It works fine for me and I hope it works for you as well, GOOD LUCK!
Link to comment
Share on other sites

Thx, i really need understanding people that can continue support/dev since i mostly moved on to arma 3.

 

You can do pull request to the git to add code snippets to master git

 

Then i'll do a quick review of the code and put it into master

Link to comment
Share on other sites

Howdy . 

 

Im getting this server and client rpt error, all appears to work even so ..but would still like to resolve

 

 0:31:04 Error in expression <
if( isNil "ZSC_Overwrite_PackVault" || ZSC_Overwrite_PackVault)then{
player_pac>
 0:31:04   Error position: <ZSC_Overwrite_PackVault)then{
player_pac>
 0:31:04   Error Undefined variable in expression: zsc_overwrite_packvault
 0:31:04 File mpmissions\__cur_mp.Napf\ZSC\gold\ZSCinit.sqf, line 23
 
Thanks in advance
Link to comment
Share on other sites

 

 

Good job, I'd been looking through the files and found the problem a couple of days ago too, but hadn't come to actually finding a proper fix and posting it yet. I'll throw you code in and give it some testing, thanks for the work :)

Link to comment
Share on other sites

Nvm about the question above, I have a hunch on how to achieve that. I know someone posted about how to have trader menu's to specific traders, so players with the same skins on would not get the trader menu. I wanted to make small traders throughout the map but don't want each one to have their own special skin, it had to do something in when the ai is spawned from the mission file but I cannot seem to find it.

Link to comment
Share on other sites

i cant seem to get the default trader's to goto coin? :/

 

does it have somthing to do with the convert?

 

This Is the error i get

SQL Error (1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'convertsc: BEGINDECLARE done INT DEFAULT 0' at line 1

there are no rpt error's as well

 

Here Is The Convert code:

 convertsc

: BEGIN

DECLARE done INT DEFAULT 0;

DECLARE @player_id VARCHAR DEFAULT "-1";

DECLARE @instance INT DEFAULT 11;

/* Cherno = 11 or 17 , Tavi = 13 and so on. just check your Database to see instance number. */

DECLARE player_cursor CURSOR FOR SELECT PlayerUID FROM player_data;

DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;

OPEN player_cursor;

read_loop: LOOP

FETCH player_cursor INTO @player_id;

DECLARE @charid INT DEFAULT -1;

DECLARE @player_money BIGINT DEFAULT 0;

DECLARE @player_bank BIGINT DEFAULT 0;

DECLARE @thesum BIGINT DEFAULT 0;

DECLARE @player_gear LONGTEXT DEFAULT '[]';

IF done <> 0 THEN

LEAVE read_loop;

END IF;

select @charid = CharacterID, @player_money = CashMoney, @player_gear = SUBSTRING(Inventory , 1, CHAR_LENGTH(Inventory ) - 1) from character_data where PlayerUID = @player_id and Alive = 1;

select @player_bank = BankSaldo from banking_data where PlayerUID = @player_id;

/* 999 hive , comment the previous 2 lines out and use the 2 following.

select @charid = CharacterID, @player_money = HeadshotsZ, @player_gear = SUBSTRING(Inventory , 1, CHAR_LENGTH(Inventory ) - 1) from character_data where PlayerUID = @player_id and Alive = 1;

select @player_bank = PlayerMorality from player_data where PlayerUID = @player_id;

*/

IF @charid <> -1 THEN 

@thesum = @player_money + @player_bank;

set @player_gear = CONCAT(@player_gear, @thesum, ']');

UPDATE character_data SET Inventory = @player_gear WHERE CharacterID = @charid;

ELSE

set @player_gear = CONCAT('[["ItemFlashlight","ItemMap","ItemCompass","ItemHatchet","ItemKnife","ItemMatchbox","ItemWatch"],["FoodSteakCooked","ItemSodaCoke","ItemBloodbag","ItemPainkiller","ItemAntibiotic","ItemMorphine","ItemEpinephrine","ItemBandage","ItemBandage","ItemBandage"],', @player_bank, ]');

INSERT INTO `character_data` (`CharacterID`, `PlayerUID`, `InstanceID`, `Datestamp`, `LastLogin`, `Inventory`, `Backpack`, `Worldspace`, `Medical`, `Alive`, `Generation`, `LastAte`, `LastDrank`, `KillsZ`, `HeadshotsZ`, `DistanceFoot`, `Duration`, `CurrentState`, `KillsH`, `Model`, `KillsB`, `Humanity`, `Infected`) VALUES (NULL, @player_id, @instance, '2014-11-22 15:02:02', '2014-11-24 22:05:43', @player_gear, '["DZ_Backpack_EP1",[[],[]],[[],[]]]', '[158,[6320.97,7795.51,0.278]]', '[false,false,false,false,false,false,false,12000,[],[0,0],0,[64.82,61.753]]', 1, 99, '2014-11-22 15:02:02', '2014-11-22 15:02:02', 0, 0, 0, 46, '["","aidlpercmstpsraswrfldnon_idlesteady03",42,[]]', 0, 'Survivor2_DZ', 0, 2500, 0);

/* If the guys didn't had an alive character this creates a char for him with his bankmoney as cash on him in stary sobor. */

END IF;

END LOOP;

CLOSE player_cursor;

DEALLOCATE player_cursor;

ALTER TABLE character_data DROP COLUMN CashMoney;

END convertsc; 

 

Same SQL error here, any idea why?

Link to comment
Share on other sites

hi there,

 

without going throug the 30 pages here,

 

cant get it to work...

 

i´ll stuck at the loading screen, but i can hear me walking ingame,ingame sounds also,  when i hit my controls...

 

client rpt: 

Warning Message: Resource title ZSC_Money_Display not found
Error in expression <ariable "ZSC_Money_Display"; 
_vitals = _wpui displayCtrl 4900;
Money = player g>
  Error position: <_wpui displayCtrl 4900;
Money = player g>
  Error Undefined variable in expression: _wpui
File mpmissions\__CUR_MP.Chernarus\ZSC\compiles\playerHud.sqf, line 6

any ideas?

 

thanks

Link to comment
Share on other sites

 

Howdy . 

 

Im getting this server and client rpt error, all appears to work even so ..but would still like to resolve

 

 0:31:04 Error in expression <
if( isNil "ZSC_Overwrite_PackVault" || ZSC_Overwrite_PackVault)then{
player_pac>
 0:31:04   Error position: <ZSC_Overwrite_PackVault)then{
player_pac>
 0:31:04   Error Undefined variable in expression: zsc_overwrite_packvault
 0:31:04 File mpmissions\__cur_mp.Napf\ZSC\gold\ZSCinit.sqf, line 23
 
Thanks in advance

 

Ok No one has a Clue ???   This error is causing some traders to not be able to sell or buy guns and ammo the other traders in NAPF Overpoch are working fine.. except for one wholesale trader.. Ive looked at that code .. I dont see anything wrong ..but something is buggin ... Save coins in banks works etc .. and trader or give players coins .. but these few traders are affected by the issue .. Ive looked over the code .. and rechecked all .. still cant see what is causing the issue.. even built a server from scratch the only thing on the server is zupa single currency, Plot For Life 2.4, Snap Build Pro and vectors... it was fine till i added zupa single currency again.. I must have missed something drivin me fakin nurtz

 

Anyone .. I wish zupa would take a peek at this 

Link to comment
Share on other sites

 

yea, i think i got it now...

the point is: the include command will look for a "ZSC" folder IN "gui", which is wrong.

try this:

    #include "..\ZSC\config\ZSChud.hpp"
};
#include "..\ZSC\config\ZSCdefines.hpp"
#include "..\ZSC\config\ZSCdialogs.hpp"

the double dot (..) should make it go one folder up, and then its fine.

 

 

 

EDIT: actually even that wouldnt work, as you can see here:

http://forums.bistudio.com/showthread.php?132476-include-statement-for-file-in-parent-folder

that is pretty weak, if you ask me.

 

so the easiest way to get around this is moving the 3 files into your "gui" folder, and call them like this instead:

    #include "ZSChud.hpp"
};
#include "ZSCdefines.hpp"
#include "ZSCdialogs.hpp"

 

 

Yeah, finally, i got it :-)))

 

After finding the "topic search" function, i  did some research in the postings between LIQUID and BangL from Post #257 up to  #314 i got it run.

 

I also have the ATD.hud running, so that was my problem too.

 

Really good work guys ! Many thanks for this amazing script and sooper support ^^ now its time to check the new coin system...

 

p.s. And today after almost a year i found my client RPT file, which gaves me the correct error ;-)  LOL /*  C:\Users\YourName\AppData\Local\ArmA 2 OA\arma2oa.RPT */

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...