salival Posted March 6, 2017 Author Report Share Posted March 6, 2017 I'm not sure then, I'll try and do some more testing tonight, I have an idea of somethig I could have missed. Off to work now anyway! Link to comment Share on other sites More sharing options...
theduke Posted March 6, 2017 Report Share Posted March 6, 2017 4 hours ago, salival said: I'll have a look and see what's involved, I haven't messed with any of the global based coin stuff. I took a look, but when the scripts start accessing the database and such, its way beyond me lol. I would love to help to be honest. But you'd have to show me a few things, the more i learn, the more i can contribute back also. I love helping others, but i can only help with what i know lol. Anyways the offer is there. if you feel for it pm me :) Duke Link to comment Share on other sites More sharing options...
dcgsteve Posted March 6, 2017 Report Share Posted March 6, 2017 Thank you for this release, I am however experiencing an issue with safes. I have a fresh 1.0.6.1 server installed and the latest Github release of this coins script. Whenever I disconnect from the server then relog, the deposited coins are not in the safe. I can see on the database that the safe has coins in the "StorageCoins" column. Traders are all working great :) Any guidance on where I may have gone wrong would be greatly welcomed. Thanks, Steve. Link to comment Share on other sites More sharing options...
salival Posted March 7, 2017 Author Report Share Posted March 7, 2017 2 hours ago, dcgsteve said: Thank you for this release, I am however experiencing an issue with safes. I have a fresh 1.0.6.1 server installed and the latest Github release of this coins script. Whenever I disconnect from the server then relog, the deposited coins are not in the safe. I can see on the database that the safe has coins in the "StorageCoins" column. Traders are all working great :) Any guidance on where I may have gone wrong would be greatly welcomed. Thanks, Steve. Hello, This can happen if you didn't merge the server_handleGear changes or if you don't have dze_moneyStorageClasses set as per the variables file I supplied Link to comment Share on other sites More sharing options...
JasonTM Posted March 8, 2017 Report Share Posted March 8, 2017 I have got the functionality for global banking working but the server side file named bankinit.sqf needs to be updated to reflect the new database structure and DLL. I can get the bankers to appear and interact with them but I get error message, "[Error] Invalid method id: 299" in the console. Obviously 299 is not the correct "Child." I see that the coins for global banking are stored under a column named "bankcoins" in the playerdata table. The file just needs to reflect this. https://gist.github.com/worldwidesorrow/6416d97efcee2bf7ff5d5fdc5972b52a Any help would be appreciated. Link to comment Share on other sites More sharing options...
theduke Posted March 8, 2017 Report Share Posted March 8, 2017 1 minute ago, JasonTM said: I have got the functionality for global banking working but the server side file named bankinit.sqf needs to be updated to reflect the new database structure and DLL. I can get the bankers to appear and interact with them but I get error message, "[Error] Invalid method id: 299" in the console. Obviously 299 is not the correct "Child." I see that the coins for global banking are stored under a column named "bankcoins" in the playerdata table. The file just needs to reflect this. https://gist.github.com/worldwidesorrow/6416d97efcee2bf7ff5d5fdc5972b52a Any help would be appreciated. This was my biggest fear, which is why i didnt attempt to go too far with it. I do remember the devs mentioning something about the DLL being ready for coins and banking... Link to comment Share on other sites More sharing options...
Zupa Posted March 8, 2017 Report Share Posted March 8, 2017 13 hours ago, JasonTM said: I have got the functionality for global banking working but the server side file named bankinit.sqf needs to be updated to reflect the new database structure and DLL. I can get the bankers to appear and interact with them but I get error message, "[Error] Invalid method id: 299" in the console. Obviously 299 is not the correct "Child." I see that the coins for global banking are stored under a column named "bankcoins" in the playerdata table. The file just needs to reflect this. https://gist.github.com/worldwidesorrow/6416d97efcee2bf7ff5d5fdc5972b52a Any help would be appreciated. I didn't read up on the previous convo's but here a quick sit down of what i think is going on: Epoch has the saving stuff implemented already: Getting variables from player object https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_server/compile/server_playerSync.sqf#L39-L41 Saving it to DB with DLL child 205 https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_server/compile/server_playerSync.sqf#L224-L227 On player login all variables are also set ( even when one doesn't use Single Currency) (Search for 'coins' in the following file to see what happens) https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_server/compile/server_playerLogin.sqf#L91-L114 theduke 1 Link to comment Share on other sites More sharing options...
Zupa Posted March 8, 2017 Report Share Posted March 8, 2017 Also to add to the coins in an object inventory saving to DB ( Already in Epoch ) Child 303 / 309 https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_server/compile/server_updateObject.sqf#L94-L110 theduke 1 Link to comment Share on other sites More sharing options...
JasonTM Posted March 9, 2017 Report Share Posted March 9, 2017 Thank you so much Zupa! I got it to work. The coins are successfully being saved to the "bankcoins" field in the player_data table and with no errors in the RPTs. Since you pointed out that the saving stuff was already implemented in 1.0.6, I was able to eliminate the bankinit.sqf file altogether. I replaced the following: Spoiler PVDZE_plr_Save = [player,(magazines player),true,true] ; publicVariableServer "PVDZE_plr_Save"; PVDZE_bank_Save = [player]; publicVariableServer "PVDZE_bank_Save"; With the simple line that salival used: call player_forceSave; The console shows that this forces Childs 201 (character data) and 205 (player data) to run. Lastly, I replaced the "bankMoney" variable with the " MoneySpecial " as you pointed out above. Thanks again, and thanks to salival and the rest of the Epoch dev team for making this work so well. Link to comment Share on other sites More sharing options...
salival Posted March 9, 2017 Author Report Share Posted March 9, 2017 4 minutes ago, JasonTM said: Thank you so much Zupa! I got it to work. The coins are successfully being saved to the "bankcoins" field in the player_data table and with no errors in the RPTs. Since you pointed out that the saving stuff was already implemented in 1.0.6, I was able to eliminate the bankinit.sqf file altogether. I replaced the following: Hide contents PVDZE_plr_Save = [player,(magazines player),true,true] ; publicVariableServer "PVDZE_plr_Save"; PVDZE_bank_Save = [player]; publicVariableServer "PVDZE_bank_Save"; With the simple line that salival used: call player_forceSave; The console shows that this forces Childs 201 (character data) and 205 (player data) to run. Lastly, I replaced the "bankMoney" variable with the " MoneySpecial " as you pointed out above. Thanks again, and thanks to salival and the rest of the Epoch dev team for making this work so well. Feel free to submit me a pull request on github with your changes Link to comment Share on other sites More sharing options...
JasonTM Posted March 9, 2017 Report Share Posted March 9, 2017 lol, I'm a newbie at github. I might need some help. I have to clean up my files a bit as well. I should be able to get it done sometime tomorrow. Link to comment Share on other sites More sharing options...
salival Posted March 9, 2017 Author Report Share Posted March 9, 2017 Pushed a commit to github to add support for other server_traders for other maps. Have napf and tavi so far. Thanks to @DAKA for testing that the traders are working. https://github.com/oiad/ZSC#changing-from-default-chernarus-server_traders-to-any-other-map Link to comment Share on other sites More sharing options...
Dusty459 Posted March 9, 2017 Report Share Posted March 9, 2017 How could I add Global Banking With a Trader? Link to comment Share on other sites More sharing options...
JasonTM Posted March 9, 2017 Report Share Posted March 9, 2017 1 hour ago, Dusty459 said: How could I add Global Banking With a Trader? You would add the "Banker Bot" feature to the trader. Link to comment Share on other sites More sharing options...
JasonTM Posted March 10, 2017 Report Share Posted March 10, 2017 Alright, the Global Banking addon is kid tested, mother approved and I have the files ready for upload. I just have to figure out this github stuff. Link to comment Share on other sites More sharing options...
JasonTM Posted March 10, 2017 Report Share Posted March 10, 2017 @salival do you want me to write up install instructions or just let you merge them? Link to comment Share on other sites More sharing options...
JasonTM Posted March 10, 2017 Report Share Posted March 10, 2017 @salival I got the files uploaded to github but I'm not sure how to do the pull request. Here is the link to the files: EDIT: Link Removed. The updated files are in the OP. theduke 1 Link to comment Share on other sites More sharing options...
salival Posted March 10, 2017 Author Report Share Posted March 10, 2017 I'll have a look when I get home from work. I'll probably just merge yours into mine and make changes to keep all the variables the same. Looks good so far though. Link to comment Share on other sites More sharing options...
lwbuk Posted March 10, 2017 Report Share Posted March 10, 2017 Added to my test server, seems to be working great. I removed the banker bots and added my own atm machines dotted around the map away from traders. I also left the safe storage active for now for people to transfer money out of the safes into the bank, although having the two systems seems to be a good idea, as other people can acsess your money if they have accsess to the safe. Good for groups etc. Excelent work.All I need to do is add the bank icon nto the HUD. Shouldnt be too hard. Link to comment Share on other sites More sharing options...
lwbuk Posted March 10, 2017 Report Share Posted March 10, 2017 Ok found a big issue. If you change clothes your bank balance is deleted. If you relog it comes back.. HOWEVER If you change clothes, then add to your bank, it wipes the orginal amount and sets it to whatever you put in after clothes change. ASLO If you die, your bank balance is wiped. Im guessing its something to do with player_switchmodel not having the coin/money variables in it? Mine doesnt anyhow.mmaybe other files that come into play when creating a new character? *edit* I appear to have fixed it with a new player_switchmodel file with the money and bank variables.. Also got the HUD working. Quite a productive day for me :D Link to comment Share on other sites More sharing options...
Cherdenko Posted March 10, 2017 Report Share Posted March 10, 2017 1 hour ago, lwbuk said: Ok found a big issue. If you change clothes your bank balance is deleted. If you relog it comes back.. HOWEVER If you change clothes, then add to your bank, it wipes the orginal amount and sets it to whatever you put in after clothes change. ASLO If you die, your bank balance is wiped. Im guessing its something to do with player_switchmodel not having the coin/money variables in it? Mine doesnt anyhow.mmaybe other files that come into play when creating a new character? *edit* I appear to have fixed it with a new player_switchmodel file with the money and bank variables.. Also got the HUD working. Quite a productive day for me :D could you maybe post the fix? Link to comment Share on other sites More sharing options...
lwbuk Posted March 10, 2017 Report Share Posted March 10, 2017 Removed. Link to comment Share on other sites More sharing options...
Airwaves Man Posted March 10, 2017 Report Share Posted March 10, 2017 @lwbuk Dont use the player_switchmodel.sqf it is redundant. Use the player_humanityMorph.sqf, there is already a player getVariable [Z_moneyVariable,0] Switch your "cashMoney" to Z_moneyVariable to keep it integrativly. Add in the player_humanityMorph.sqf in if (Z_SingleCurrency) then { your special money like that: At the beginning: if (Z_SingleCurrency) then { _coins = player getVariable [Z_moneyVariable,0]; _bankMoney = player getVariable["MoneySpecial",0]; }; At the end if (Z_SingleCurrency) then { player setVariable [Z_moneyVariable,_coins,true]; player setVariable ["MoneySpecial",_bankMoney,true]; }; If you have wiped your coins, make sure that you call the right player_humanityMorph.sqf in your compiles. Bank coins getting wiped because there is not defines for bank money in the player_humanityMorph.sqf but for the normal player coins. Link to comment Share on other sites More sharing options...
lwbuk Posted March 10, 2017 Report Share Posted March 10, 2017 Well my way works still, been testing it for an hour. Dying, changing clothes dying again, restarting sever. But if there is a better way then I'm all for it. Link to comment Share on other sites More sharing options...
salival Posted March 10, 2017 Author Report Share Posted March 10, 2017 @A Manis correct player_humanityMorph is the best way to do it. https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/player_humanityMorph.sqf#L32 https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/player_humanityMorph.sqf#L93 I will get these changes merged into Epoch as well Airwaves Man 1 Link to comment Share on other sites More sharing options...
Recommended Posts