Voltan Posted May 1, 2017 Report Share Posted May 1, 2017 Hi all, I am just wondering if anyone has run into this with their single currency setup. I can loot coins from an AI, but then when I try to loot coins off other AI it keeps coming up with whatever the name of the first ai was has no coins, and keeps on saying that for a while, but after a while you can loot coins off one more, then it gets stuck in that loop again it seems. I am not getting any errors in my server rpt other than hundreds of missing config classes because I am running Sauerland :P Link to comment Share on other sites More sharing options...
R4idmeister Posted May 1, 2017 Report Share Posted May 1, 2017 Hi all i have this all setup however the NPC bankers have no scroll option and the Bank icon under the coin shows 0 even though in my Safe Bank i have 2.5mil and 1.5mil in one of my SUV's This is really bugging me coz I've gone over the install and I've not missed anything as far as i can see Many Thanks in advance Raiden Link to comment Share on other sites More sharing options...
Relentless Posted May 1, 2017 Report Share Posted May 1, 2017 34 minutes ago, Voltan said: Hi all, I am just wondering if anyone has run into this with their single currency setup. I can loot coins from an AI, but then when I try to loot coins off other AI it keeps coming up with whatever the name of the first ai was has no coins, and keeps on saying that for a while, but after a while you can loot coins off one more, then it gets stuck in that loop again it seems. I am not getting any errors in my server rpt other than hundreds of missing config classes because I am running Sauerland :P What AI missions are you using? For each AI system you have to edit custom files. I do not have this issue but I suggest you should also check your client rpt. That sounds like your selfaction isn't resetting. Link to comment Share on other sites More sharing options...
Relentless Posted May 1, 2017 Report Share Posted May 1, 2017 3 minutes ago, R4idmeister said: Hi all i have this all setup however the NPC bankers have no scroll option and the Bank icon under the coin shows 0 even though in my Safe Bank i have 2.5mil and 1.5mil in one of my SUV's This is really bugging me coz I've gone over the install and I've not missed anything as far as i can see Many Thanks in advance Raiden If you don't get a scroll option on NPCs, that's related to your fn_selfActions.sqf. There is a special file for that in the download. Did you replace your fn_selfActions.sqf with the provided one? It's located in "downloads\ZSC\global_banking\dayz_code\compile\". Or do you have any rpt errors? Link to comment Share on other sites More sharing options...
R4idmeister Posted May 1, 2017 Report Share Posted May 1, 2017 No errors and i didn't replace the fn_selfactions from global banking i edit the one from normal zsc I'll look into this now Link to comment Share on other sites More sharing options...
Relentless Posted May 1, 2017 Report Share Posted May 1, 2017 2 minutes ago, R4idmeister said: No errors and i didn't replace the fn_selfactions from global banking i edit the one from normal zsc I'll look into this now This part is important and the corresponding reset actions: Spoiler if (_typeOfCursorTarget in DZE_MoneyStorageClasses && {!locked _cursorTarget} && {!(_typeOfCursorTarget in DZE_LockedStorage)} && {player distance _cursorTarget < 5}) then { if (s_bank_dialog < 0) then { s_bank_dialog = player addAction ["Access bank","scripts\zsc\bankDialog.sqf",_cursorTarget,1,true,true]; }; } else { player removeAction s_bank_dialog; s_bank_dialog = -1; }; if (_isAlive && {_typeOfCursorTarget in AllPlayers} && {isPlayer _cursorTarget}) then { if (s_givemoney_dialog < 0) then { s_givemoney_dialog = player addAction [format ["Trade %1 with %2",CurrencyName,name _cursorTarget],"scripts\zsc\givePlayer.sqf",_cursorTarget,3,true,true]; }; } else { player removeAction s_givemoney_dialog; s_givemoney_dialog = -1; }; if (_isMan && {!(isPlayer _cursorTarget)} && {_typeOfCursorTarget in ZSC_bankTraders} && {!_isPZombie}) then { if (s_bank_dialog1 < 0) then { s_bank_dialog1 = player addAction ["Bank Teller","scripts\zsc\atmDialog.sqf",_cursorTarget,3,true,true]; }; } else { player removeAction s_bank_dialog1; s_bank_dialog1 = -1; }; if (_typeOfCursorTarget in ZSC_bankObjects && {player distance _cursorTarget < 5}) then { if (s_bank_dialog2 < 0) then { s_bank_dialog2 = player addAction ["Bank ATM","scripts\zsc\atmDialog.sqf",_cursorTarget,3,true,true]; }; } else { player removeAction s_bank_dialog2; s_bank_dialog2 = -1; }; Link to comment Share on other sites More sharing options...
R4idmeister Posted May 1, 2017 Report Share Posted May 1, 2017 Just now, DAmNRelentless said: This part is important and the corresponding reset actions: Hide contents if (_typeOfCursorTarget in DZE_MoneyStorageClasses && {!locked _cursorTarget} && {!(_typeOfCursorTarget in DZE_LockedStorage)} && {player distance _cursorTarget < 5}) then { if (s_bank_dialog < 0) then { s_bank_dialog = player addAction ["Access bank","scripts\zsc\bankDialog.sqf",_cursorTarget,1,true,true]; }; } else { player removeAction s_bank_dialog; s_bank_dialog = -1; }; if (_isAlive && {_typeOfCursorTarget in AllPlayers} && {isPlayer _cursorTarget}) then { if (s_givemoney_dialog < 0) then { s_givemoney_dialog = player addAction [format ["Trade %1 with %2",CurrencyName,name _cursorTarget],"scripts\zsc\givePlayer.sqf",_cursorTarget,3,true,true]; }; } else { player removeAction s_givemoney_dialog; s_givemoney_dialog = -1; }; if (_isMan && {!(isPlayer _cursorTarget)} && {_typeOfCursorTarget in ZSC_bankTraders} && {!_isPZombie}) then { if (s_bank_dialog1 < 0) then { s_bank_dialog1 = player addAction ["Bank Teller","scripts\zsc\atmDialog.sqf",_cursorTarget,3,true,true]; }; } else { player removeAction s_bank_dialog1; s_bank_dialog1 = -1; }; if (_typeOfCursorTarget in ZSC_bankObjects && {player distance _cursorTarget < 5}) then { if (s_bank_dialog2 < 0) then { s_bank_dialog2 = player addAction ["Bank ATM","scripts\zsc\atmDialog.sqf",_cursorTarget,3,true,true]; }; } else { player removeAction s_bank_dialog2; s_bank_dialog2 = -1; }; what line do i paste this on? as i've made changes to the fn_selfactions already Link to comment Share on other sites More sharing options...
R4idmeister Posted May 1, 2017 Report Share Posted May 1, 2017 10 minutes ago, R4idmeister said: what line do i paste this on? as i've made changes to the fn_selfactions already I figured this out i looked at the differences all is working now :) Many Thanks again Link to comment Share on other sites More sharing options...
salival Posted May 1, 2017 Author Report Share Posted May 1, 2017 @VoltanHoly fuck, use spoiler tags in future. It's also not an issue with zsc. Link to comment Share on other sites More sharing options...
Voltan Posted May 1, 2017 Report Share Posted May 1, 2017 1 hour ago, salival said: @VoltanHoly fuck, use spoiler tags in future. It's also not an issue with zsc. Did you see an issue with the .rpt? My post gone? Sorry, will try the spoiler thing next time Link to comment Share on other sites More sharing options...
salival Posted May 1, 2017 Author Report Share Posted May 1, 2017 11 minutes ago, Voltan said: Did you see an issue with the .rpt? My post gone? Sorry, will try the spoiler thing next time I removed the post, there was nothing in there relevant, if anything your server rpt is what you should have posted since dzms/Wai is server side. All check wallet does is check the body for a variable, if it finds coins it sets that variable to true so fn_selfActions won't let you check the body again. If you can check the same body over and over again then there is another issue. If the bodies don't have coins on them then there's an issue with your ai mods Upload your server rpt to Dropbox or pastebin and drop the link in here. Voltan 1 Link to comment Share on other sites More sharing options...
BigEgg Posted May 1, 2017 Report Share Posted May 1, 2017 10 hours ago, Voltan said: Hi all, I am just wondering if anyone has run into this with their single currency setup. I can loot coins from an AI, but then when I try to loot coins off other AI it keeps coming up with whatever the name of the first ai was has no coins, and keeps on saying that for a while, but after a while you can loot coins off one more, then it gets stuck in that loop again it seems. I am not getting any errors in my server rpt other than hundreds of missing config classes because I am running Sauerland :P 8 minutes ago, salival said: I removed the post, there was nothing in there relevant, if anything your server rpt is what you should have posted since dzms/Wai is server side. All check wallet does is check the body for a variable, if it finds coins it sets that variable to true so fn_selfActions won't let you check the body again. If you can check the same body over and over again then there is another issue. If the bodies don't have coins on them then there's an issue with your ai mods Upload your server rpt to Dropbox or pastebin and drop the link in here. I don't think this is an issue with the AI, I have had it happen when quickly looting. Could be an issue with the fn_selfActions, but I know when you quickly go from body to body, if you don't look up and refresh the scroll menu, this can happen. Hooty 1 Link to comment Share on other sites More sharing options...
Voltan Posted May 1, 2017 Report Share Posted May 1, 2017 16 minutes ago, salival said: I removed the post, there was nothing in there relevant, if anything your server rpt is what you should have posted since dzms/Wai is server side. All check wallet does is check the body for a variable, if it finds coins it sets that variable to true so fn_selfActions won't let you check the body again. If you can check the same body over and over again then there is another issue. If the bodies don't have coins on them then there's an issue with your ai mods Upload your server rpt to Dropbox or pastebin and drop the link in here. I believe the bodies do have coins on them, but it seems like the interface is getting stuck in a loop or something when it gets coins off one ai, and it seems to take a while to fix itself. I will have a quick look through my fn_selfactions Here is my server RPT for last night, fair warning, its not small. https://www.dropbox.com/s/gjujz2nowizegot/arma2oaserver.RPT?dl=0 Link to comment Share on other sites More sharing options...
salival Posted May 2, 2017 Author Report Share Posted May 2, 2017 Arma is pretty slack on when it decides to refresh the cursorTarget. I think this is not a bug as much as it is a problem. The only real way to fix it is to run. Away from the body then run back and try it, the cursorTarget will refresh (hopefully) then. Hooty, BigEgg and Voltan 3 Link to comment Share on other sites More sharing options...
Voltan Posted May 4, 2017 Report Share Posted May 4, 2017 On 5/2/2017 at 10:02 AM, salival said: Arma is pretty slack on when it decides to refresh the cursorTarget. I think this is not a bug as much as it is a problem. The only real way to fix it is to run. Away from the body then run back and try it, the cursorTarget will refresh (hopefully) then. I was looking through the zsc files, and I am a noob with coding, but see the below script from checkwallet.sqf, but would this script using the coin variable name Z_MoneyVariable have issues if I am assigning my DZAI, WAI and DZMS AI the "CashMoney" variable? I am still having alot of issues with players getting coins off their own dead bodies, with it mostly telling them as per below code "Unknown has no coins". Walking away for a minute doesnt seem to help. Spoiler private ["_body","_playerNear","_name","_hisMoney","_myMoney"]; if (dayz_actionInProgress) exitWith {"You are already performing an action, wait for the current action to finish." call dayz_rollingMessages;}; dayz_actionInProgress = true; _body = _this select 3; if (isNull _body) exitWith {dayz_actionInProgress = false; systemChat "cursorTarget isNull!";}; _playerNear = {isPlayer _x} count ((getPosATL _body) nearEntities ["CAManBase", 10]) > 1; if (_playerNear) exitWith {dayz_actionInProgress = false;localize "str_pickup_limit_5" call dayz_rollingMessages;}; _name = _body getVariable ["bodyName","unknown"]; _hisMoney = _body getVariable [Z_MoneyVariable,0]; if (isNil "_hisMoney") then { _hisMoney = 0;}; if (!(typeName _hisMoney == "SCALAR") || {_hisMoney < 1}) exitWith {dayz_actionInProgress = false; format ["%1 has no %2",_name,CurrencyName] call dayz_rollingMessages}; _myMoney = player getVariable [Z_MoneyVariable,0]; _myMoney = _myMoney + _hisMoney; _body setVariable [Z_MoneyVariable,0,true]; player setVariable [Z_MoneyVariable,_myMoney,true]; systemChat format ["You took %1 %2, ID says %3!",[_hisMoney] call BIS_fnc_numberText,CurrencyName,_name]; player playActionNow "PutDown"; uiSleep 2; dayz_actionInProgress = false; Link to comment Share on other sites More sharing options...
salival Posted May 4, 2017 Author Report Share Posted May 4, 2017 21 minutes ago, Voltan said: I was looking through the zsc files, and I am a noob with coding, but see the below script from checkwallet.sqf, but would this script using the coin variable name Z_MoneyVariable have issues if I am assigning my DZAI, WAI and DZMS AI the "CashMoney" variable? I am still having alot of issues with players getting coins off their own dead bodies, with it mostly telling them as per below code "Unknown has no coins". Walking away for a minute doesnt seem to help. Hide contents private ["_body","_playerNear","_name","_hisMoney","_myMoney"]; if (dayz_actionInProgress) exitWith {"You are already performing an action, wait for the current action to finish." call dayz_rollingMessages;}; dayz_actionInProgress = true; _body = _this select 3; if (isNull _body) exitWith {dayz_actionInProgress = false; systemChat "cursorTarget isNull!";}; _playerNear = {isPlayer _x} count ((getPosATL _body) nearEntities ["CAManBase", 10]) > 1; if (_playerNear) exitWith {dayz_actionInProgress = false;localize "str_pickup_limit_5" call dayz_rollingMessages;}; _name = _body getVariable ["bodyName","unknown"]; _hisMoney = _body getVariable [Z_MoneyVariable,0]; if (isNil "_hisMoney") then { _hisMoney = 0;}; if (!(typeName _hisMoney == "SCALAR") || {_hisMoney < 1}) exitWith {dayz_actionInProgress = false; format ["%1 has no %2",_name,CurrencyName] call dayz_rollingMessages}; _myMoney = player getVariable [Z_MoneyVariable,0]; _myMoney = _myMoney + _hisMoney; _body setVariable [Z_MoneyVariable,0,true]; player setVariable [Z_MoneyVariable,_myMoney,true]; systemChat format ["You took %1 %2, ID says %3!",[_hisMoney] call BIS_fnc_numberText,CurrencyName,_name]; player playActionNow "PutDown"; uiSleep 2; dayz_actionInProgress = false; Z_moneyVariable is just a pointer to cash money. We use it for consitancy so that shouldn't matter. https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/configVariables.sqf#L71 There should be no way the player can take coins off their body after taking them off unless something else is going wrong since I'm setting the body's coins to 0 after looting them in the first place if they have coins. If the body doesn't have coins or the coins are invalid the player will not get coins since the script is exited when they receive the "unknown has no coins" message. No money will change hands. https://github.com/oiad/ZSC/blob/master/scripts/zsc/checkWallet.sqf#L17 I will pm you with my email address and you can send your dayz_server and mission folder to me. DieTanx 1 Link to comment Share on other sites More sharing options...
salival Posted May 4, 2017 Author Report Share Posted May 4, 2017 So @Voltan sent me his files and I had a look through, we'll put it down to an installation error, it's all working as it should as well as fixing a lot of other problems and tidying stuff up. Voltan 1 Link to comment Share on other sites More sharing options...
iben Posted May 8, 2017 Report Share Posted May 8, 2017 (edited) EDIT: Do not used code from this post, it's outdated. See dedicated thread with updates. === Hello guys, first: @salival I'm regular visitor of this forum for almost a year and this is my very first post. I'd like to say... it's incredible how well you're doing with community support. Hat off! second: ...the same is valid of course for @juandayz, @theduke and many other awesome guys! Now, I'm studying new changes to epoch 1.0.6.1 and preparing some addon for fun. That's why i reworked a little bit former @zupas dev functions and want to share it here. Maybe it will be usefull for someone. It's tested and working but I have to admit - I haven't time to test it well! If there will be problem, I will adjust code or... someone will come with better version.All credits goes to @zupa and @salival. 1. Check the code bellow: it's just one file. You can use it for adding/removing players coins to/from wallet/bank account. 2. How to use it: in your custom compiles folder create file named 'fnc_SC_uniCoins.sqf'; in your custom compiles file add following line: 'fnc_SC_uniCoins = compile preprocessFileLineNumbers "path\to\custom\compiles\fnc_SC_uniCoins.sqf"'; in your code use: [_player,_amount,_action,_target] call fnc_SC_uniCoins; parameters are described in code bellow you can copy code or download from gist: here is the link 3. How to test it: if you're working on some addon, you don't need my advice :) if you don't know how to test it, you can use my example created just for you: Example scenario is just for test (but...) Scenario: Player is awarded for killing local zombies by coins (random amount from 0 to 250 Coins) Modelling: (1) Add money to wallet for kill (2) Remove money from wallet for kill (3) Add money to bank account for kill (4) Remove money from bank account for kill - for test we're using file from Epoch 'dayz_code\compiles' named 'local_eventKill.sqf' + original src: here is the link - repeate common workflow (custom compiles, variables...) + Read comments in code header! - again, you can copy code or download from gist: here is the link Again, thank you guys for your awesome work!!! cy, @iben PS: well, inserting snippets seems to be harder that I thought :) Sorry for merging two spoilers into one layer! // =========================================================================== // SINGLE CURRENCY (@money: universal dev function: add/remove cache/bank coins) // =========================================================================== // @credits: // - DayZ Epoch developers, collaborators and contributors // (thank you guys for your excellent work!) // - @Zupa: original SC concept creator and author of Universal Dev functions // for 1.0.5 version. // (see https://epochmod.com/forum/topic/15463-devs-universal-removeadd-coins-function/) // - @salival for adapting @Zupa's concept to 1.0.6+ version and great community support // (see: https://epochmod.com/forum/topic/43331-zsc-for-epoch-106-and-overwatch-025/) // =========================================================================== // Reworked for DayZ Epoch 1.0.6.1+ by @iben+ // =========================================================================== // @parameters: // [_player,_amount,_action,_target] call fnc_SC_uniCoins; // '_player' : object : player, _killer...etc // '_amount' : number : 1000 // '_action' : string : 'add' / 'remove' // '_target' : string : 'cache' / 'bank' // @usage: // === Example 01: Remove 5.000 Coins from player's wallet: // [player,5000,'remove','cache'] call fnc_SC_uniCoins; // === Example 02: Add 1.000 Coins to playe's bank account // [player,1000,'add','bank'] call fnc_SC_uniCoins; // =========================================================================== // @important: // + DayZ Epoch 'local_eventKill.sqf' with code for testing is available: // https://gist.github.com/infobeny/0fa8ff0f0a50ca7877a26e0951ac358e // =========================================================================== private ["_player","_amount","_action","_target","_gvar","_result", "_fnc_previewCoins","_fnc_removeCoins","_fnc_addCoins"]; _player = _this select 0; _amount = _this select 1; _action = _this select 2; _target = _this select 3; _gvar = [Z_bankVariable, Z_moneyVariable] select (_target == "cache"); _result = false; _fnc_previewCoins = { private ["_money"]; _money = 0; _money = _player getVariable [_gvar, 0]; _money }; _fnc_removeCoins = { private ["_wealth","_removed"]; _wealth = call _fnc_previewCoins; _removed = false; if (_amount > 0) then { if (_wealth < _amount) then { _removed = false; } else { _player setVariable [_gvar, _wealth - _amount, true]; _removed = true; call player_forceSave; }; } else { _removed = true; }; _removed }; _fnc_addCoins = { private ["_wealth","_added","_newWealth"]; _wealth = call _fnc_previewCoins; _added = false; _player setVariable [_gvar, _wealth + _amount, true]; call player_forceSave; _newWealth = call _fnc_previewCoins; if (_newWealth >= _wealth) then {_added = true;}; _added }; if ((!isNil "_action") && (!isNil "_target")) then { call { if (_action == "remove") exitWith { if (call _fnc_removeCoins) then {_result = true;} else {_result = false;}; }; if (_action == "add") exitWith { if (call _fnc_addCoins) then {_result = true;} else {_result = false;}; }; _result = false; // default }; }; _result // =========================================================================== // SINGLE CURRENCY (@money: universal dev function: local_eventKill debug test // =========================================================================== // @credits: // - DayZ Epoch developers, collaborators and contributors // (thank you guys for your excellent work!) // - @Zupa: original SC concept creator and author of Universal Dev functions // for 1.0.5 version. // (see https://epochmod.com/forum/topic/15463-devs-universal-removeadd-coins-function/) // - @salival for adapting @Zupa's concept to 1.0.6+ version and great community support // (see: https://epochmod.com/forum/topic/43331-zsc-for-epoch-106-and-overwatch-025/) // =========================================================================== // Reworked for DayZ Epoch 1.0.6.1+ by @iben+ // =========================================================================== // @testing example scenario: // - Player is awarded for killing local zombies by coins (from 0 to 250) // - We want to test all scenarios for fnc_SC_uniCoins function: // + Add money to wallet for kill. // + Remove money from wallet for kill. // + Add money to bank account for kill. // + Remove money from bank account for kill. // @how to use this file: // - Use usuall workflow: // + custom compiles, // + custom variables (for ibenDBG_zedAward), // + don't forget to get fnc_SC_uniCoins.sqf file from: // https://gist.github.com/infobeny/cd250b83617b5a86f0c9c156e7c8713e // + update code to your needs (see @update tag bellow!) // =========================================================================== // =========================================================================== // ORIGINAL CODE FROM DAYZ_CODE // =========================================================================== //[unit, selectionName, damage, source, projectile] //will only run when local to the created object //record any key hits to the required selection private["_killer","_fnc_uniCoinsTest"]; _array = _this select 0; _zed = _array select 0; _killer = _array select 1; _type = _this select 1; if (local _zed) then { _kills = _killer getVariable[_type,0]; _killer setVariable[_type,(_kills + 1),true]; //increase players humanity when zed killed _humanity = _killer getVariable["humanity",0]; _humanity = _humanity + 5; _killer setVariable["humanity",_humanity,true]; // =========================================================================== // FNC_SC_UNICOINS TEST // =========================================================================== _fnc_uniCoinsTest = { private ["_action","_target","_money","_curWep"]; _action = _this select 0; _target = _this select 1; _money = (round(random 5) * 50); // @update: now from 0 to 250 Coins _curWep = getText (configFile >> 'CfgWeapons' >> currentWeapon _killer >> 'displayName'); if !([_killer,_money,_action,_target] call fnc_SC_uniCoins) then { hintSilent format ["Error!\nNot enough Coins for %1 from/to %2 procedure OR wrong settings (check RPT)",_action,_target]; } else { hintSilent format ["Success!\nweapon: [%1]\naction: [%2]\ntarget: [%3]\nmoney: [%4 %5]",_curWep,_action,_target,_money,CurrencyName]; }; }; if (ibenDBG_zedAward) then { call { // @update: Change weapons classes bellow to your taste if ((currentWeapon _killer) == 'M110_NVG_EP1') exitWith { ["add","cache"] call _fnc_uniCoinsTest; }; if ((currentWeapon _killer) == 'M9_SD_DZ') exitWith { ["remove","cache"] call _fnc_uniCoinsTest; }; if ((currentWeapon _killer) == 'DMR_DZ') exitWith { ["add","bank"] call _fnc_uniCoinsTest; }; if ((currentWeapon _killer) == 'M9_DZ') exitWith { ["remove","bank"] call _fnc_uniCoinsTest; }; hintSilent "Error! Check your weapon className!"; // Default }; }; // =========================================================================== }; Edited May 28, 2017 by iben Dedicated thread created juandayz and kheldar125 2 Link to comment Share on other sites More sharing options...
juandayz Posted May 15, 2017 Report Share Posted May 15, 2017 @iben i dont know why, but i feel you gonna made awesome mods for all of us in a short time. and with the respect in which you talk with others.... you gonna be a great member here. hat off! for you mate. and are you sure youre not zupa with another nikname? Link to comment Share on other sites More sharing options...
iben Posted May 15, 2017 Report Share Posted May 15, 2017 17 minutes ago, juandayz said: @iben i dont know why, but i feel you gonna made awesome mods for all of us in a short time. and with the respect in which you talk with others.... you gonna be a great member here. hat off! for you mate. and are you sure youre not zupa with another nikname? Oh mate, you are so kind to me... :) But there are two basic facts: 1) I wish I were, but I'm not zupa :)) 2) There are so many great and skilled guys like for example You, that brings us these great addons for long time! I'm thinking right now which way I could contribute to community right now... :) juandayz 1 Link to comment Share on other sites More sharing options...
kheldar125 Posted May 16, 2017 Report Share Posted May 16, 2017 @iben This is exactly what I've been looking for! I've been trying to integrate giving coins into an admin menu, could never get adding or removing from banks to work correctly. And this is so more elegant a solution to how I was doing it. Thanks :D And also you are completely right about all the great guys and girls on here who are always willing to help others. Its a real shame some people don't appreciate all the hard work they do, (especially putting up with the silly questions I usually ask :D) iben 1 Link to comment Share on other sites More sharing options...
iben Posted May 16, 2017 Report Share Posted May 16, 2017 3 minutes ago, kheldar125 said: @iben This is exactly what I've been looking for! Hi @kheldar125 :)) Oh man, this is the right place to ask silly question if any question is silly :))) Thx mate And BTW, if it was what you needed, try checkout this post about kill coins rewards and specific part where is guide how to use these functions in real example... cheers Hooty 1 Link to comment Share on other sites More sharing options...
juandayz Posted June 7, 2017 Report Share Posted June 7, 2017 Quote Yes there is in hiveext.log never thought to look there still im still a noob. here is the error 2017-03-08 03:19:00 HiveExt: [Information] SQF Failed to pass both player coins and player bank values skipping update Quote Well, I can't explain that. As I said it has to be something specific to your server, i.e a database issue or an install problem. @salival i was be able to reproduce the @Hooty issue from above. its shows in the hive when player_humanityMorph is called. Its not a ZSC error. Show you how i reproduce it. i create a small script to test it. using your default coins and the iben function. testcoins.sqf (call it with keyboard, fn_selfactions.. you know..) Spoiler private ["_Reward","_moneyTarget","_wealth"]; _Reward = 5000; _moneyTarget = "cache"; _use_fn_uniCoins = false; if (!_use_fn_uniCoins) then { _wealth = player getVariable[Z_moneyVariable, 0]; player setVariable[Z_moneyVariable, (_wealth + _Reward), true]; }else{ [player,_Reward,"add",_moneyTarget] call fnc_SC_uniCoins; }; systemChat format["Testing:%1 add %2 coins to his %3",name player,_Reward,_moneyTarget]; at bottom of my init i change the skins of players everytime they loging in. bottom init.sqf call compile preprocessFileLineNumbers "changeSkins_init.sqf"; changeSkins_init.sqf Spoiler private ["_skin","_recognize_as_defaultskin"]; _skin = [ "Pierce","US_Soldier_AR_EP1","US_Soldier_Crew_EP1","US_Soldier_Light_EP1","US_Soldier_Pilot_EP1","CZ_Soldier_MG_DES_EP1", "CZ_Soldier_Pilot_DES_EP1","GER_Soldier_EP1","GER_Soldier_TL_EP1","BAF_crewman_DDPM","BAF_Soldier_Officer_DDPM","BAF_Soldier_L_DDPM", "BAF_Pilot_DDPM","TK_CIV_Worker01_EP1","FR_Miles","FR_Ohara","FR_Sykes","FR_AR","FR_Assault_R","FR_Sapper", "USMC_Soldier2","USMC_Soldier_Crew","USMC_Soldier_Officer","USMC_Soldier_Pilot","CDF_Commander", "CDF_Soldier_AR","CDF_Soldier_Crew","CDF_Soldier_Light","CDF_Soldier_Militia","CDF_Soldier_Pilot","Worker4" ]call BIS_fnc_selectRandom; _recognize_as_defaultskin = ["Bandit1_DZ","BanditW1_DZ","Survivor1_DZ","Survivor2_DZ","SurvivorW2_DZ", "Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Bandit2_DZ","BanditW2_DZ","SurvivorW2_DZ"]; waitUntil {uiSleep 1; !isNil ("Dayz_loginCompleted")}; if (typeOf player in _recognize_as_defaultskin) then { [dayz_playerUID,dayz_characterID,_skin] spawn player_humanityMorph; }; pic Spoiler error: 2017-06-06 13:53:26 HiveExt: [Information] Method: 205 Params: 76561198257572970:2:-1:-1: 2017-06-06 13:53:26 HiveExt: [Information] SQF Failed to pass both player coins and player bank values skipping update 2017-06-06 13:53:26 HiveExt: [Information] Result: ["PASS"] my custom variables.sqf Spoiler Z_singleCurrency = true; DZE_maintainCurrencyRate = 1000; Z_bankVariable = "moneySpecial"; Z_globalVariable = "GlobalMoney"; my custom configvariables.sqf Spoiler Z_SingleCurrency = true; CurrencyName = "Coins"; Z_MoneyVariable = "cashMoney"; The coins is added well.. and saved fine. ..Blablabla: Spoiler first i think was an issue with the iben function, send a msg to him.. but not... then removing lines and testing.. was it: [dayz_playerUID,dayz_characterID,_skin] spawn player_humanityMorph; I dont know how fix it.. but is it. Link to comment Share on other sites More sharing options...
juandayz Posted June 7, 2017 Report Share Posted June 7, 2017 so maybe is an issue with ESSV3? cuz at the start you change your skins.. if u add money..the hive line spawns.. if u log out and loging again thers no problem. Link to comment Share on other sites More sharing options...
Hooty Posted June 8, 2017 Report Share Posted June 8, 2017 5 hours ago, juandayz said: @salival i was be able to reproduce the @Hooty issue from above. its shows in the hive when player_humanityMorph is called. Its not a ZSC error. Show you how i reproduce it. i create a small script to test it. using your default coins and the iben function. testcoins.sqf (call it with keyboard, fn_selfactions.. you know..) Reveal hidden contents private ["_Reward","_moneyTarget","_wealth"]; _Reward = 5000; _moneyTarget = "cache"; _use_fn_uniCoins = false; if (!_use_fn_uniCoins) then { _wealth = player getVariable[Z_moneyVariable, 0]; player setVariable[Z_moneyVariable, (_wealth + _Reward), true]; }else{ [player,_Reward,"add",_moneyTarget] call fnc_SC_uniCoins; }; systemChat format["Testing:%1 add %2 coins to his %3",name player,_Reward,_moneyTarget]; at bottom of my init i change the skins of players everytime they loging in. bottom init.sqf call compile preprocessFileLineNumbers "changeSkins_init.sqf"; changeSkins_init.sqf Reveal hidden contents private ["_skin","_recognize_as_defaultskin"]; _skin = [ "Pierce","US_Soldier_AR_EP1","US_Soldier_Crew_EP1","US_Soldier_Light_EP1","US_Soldier_Pilot_EP1","CZ_Soldier_MG_DES_EP1", "CZ_Soldier_Pilot_DES_EP1","GER_Soldier_EP1","GER_Soldier_TL_EP1","BAF_crewman_DDPM","BAF_Soldier_Officer_DDPM","BAF_Soldier_L_DDPM", "BAF_Pilot_DDPM","TK_CIV_Worker01_EP1","FR_Miles","FR_Ohara","FR_Sykes","FR_AR","FR_Assault_R","FR_Sapper", "USMC_Soldier2","USMC_Soldier_Crew","USMC_Soldier_Officer","USMC_Soldier_Pilot","CDF_Commander", "CDF_Soldier_AR","CDF_Soldier_Crew","CDF_Soldier_Light","CDF_Soldier_Militia","CDF_Soldier_Pilot","Worker4" ]call BIS_fnc_selectRandom; _recognize_as_defaultskin = ["Bandit1_DZ","BanditW1_DZ","Survivor1_DZ","Survivor2_DZ","SurvivorW2_DZ", "Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Bandit2_DZ","BanditW2_DZ","SurvivorW2_DZ"]; waitUntil {uiSleep 1; !isNil ("Dayz_loginCompleted")}; if (typeOf player in _recognize_as_defaultskin) then { [dayz_playerUID,dayz_characterID,_skin] spawn player_humanityMorph; }; pic Reveal hidden contents error: 2017-06-06 13:53:26 HiveExt: [Information] Method: 205 Params: 76561198257572970:2:-1:-1: 2017-06-06 13:53:26 HiveExt: [Information] SQF Failed to pass both player coins and player bank values skipping update 2017-06-06 13:53:26 HiveExt: [Information] Result: ["PASS"] my custom variables.sqf Reveal hidden contents Z_singleCurrency = true; DZE_maintainCurrencyRate = 1000; Z_bankVariable = "moneySpecial"; Z_globalVariable = "GlobalMoney"; my custom configvariables.sqf Reveal hidden contents Z_SingleCurrency = true; CurrencyName = "Coins"; Z_MoneyVariable = "cashMoney"; The coins is added well.. and saved fine. ..Blablabla: Reveal hidden contents first i think was an issue with the iben function, send a msg to him.. but not... then removing lines and testing.. was it: [dayz_playerUID,dayz_characterID,_skin] spawn player_humanityMorph; I dont know how fix it.. but is it. @juandayz Check your progress monitor. That is what mine was from the hotfix. Figured it out when the last time I installed hotfix, after coins were fully working for me. When I installed the hotfix, it started resetting coins again. Link to comment Share on other sites More sharing options...
Recommended Posts