Jump to content

[Issue] Banking_data not saving for new players? (FIXED)


Recommended Posts

  On 9/8/2014 at 5:38 PM, waTTe said:

we do truncate it because this trigger only works on insert in player_data not and not on update, (it would be possible to create a trigger for update too!)

 

so if you would have a player where banking_Data did not get created and he is already in the player_Data table, my trigger would not help fix it ....

 

it doesnt really hurt to truncate the player_Data table because nothing gets lost. No character gets wiped or anything

 

its only a table with playername and playerUID which simply gets created new if its missing ...

gotcha

Link to comment
Share on other sites

You can find it over at Soul's Github: https://github.com/UK431-Soul/DayZ-Epoch_SCHiveExt/tree/master/dayz_server/bankzones.

If you've downloaded that file, make sure you update your server_functions.sqf as well.

 

Note that this fix is for people who use Soul's DLL. If you don't have it installed I don't think this works for you. If you DO have it installed, you should already have those files.

Link to comment
Share on other sites

  • 3 weeks later...

For some reason none of fixes actually worked for me on dedi, but did work on local test machine by default. Weird..

 

 

Anyway, since I am not running as root, I changed definer. Also AFTER UPDATE ON didn't work, since fields are not updated, just created when a new player joins (right?)... it's a fresh server

However making a trigger for AFTER INSERT ON works. 

CREATE DEFINER=`dayz`@`localhost` TRIGGER `banking` AFTER INSERT ON `player_data` FOR EACH ROW INSERT INTO banking_data
( PlayerUID, PlayerName, BankSaldo,  LastUpdated)
VALUES
(NEW.PlayerUID, NEW.PlayerName, 0, NOW())
Link to comment
Share on other sites

  On 10/5/2014 at 10:30 AM, raymix said:

 

For some reason none of fixes actually worked for me on dedi, but did work on local test machine by default. Weird..

 

 

Anyway, since I am not running as root, I changed definer. Also AFTER UPDATE ON didn't work, since fields are not updated, just created when a new player joins (right?)... it's a fresh server

However making a trigger for AFTER INSERT ON works. 

CREATE DEFINER=`dayz`@`localhost` TRIGGER `banking` AFTER INSERT ON `player_data` FOR EACH ROW INSERT INTO banking_data
( PlayerUID, PlayerName, BankSaldo,  LastUpdated)
VALUES
(NEW.PlayerUID, NEW.PlayerName, 0, NOW())

 

You have a point. The event should run with AFTER INSERT instead of UPDATE, indeed. I'll update the first post.

Link to comment
Share on other sites

i could do with some help on this, i have applied the fixes in this thread but no coins are being sent to database and lose when relogging or server restart.

 

i can alter the coin amount in the database and when the player relogs, the new amount will show on him but not the other way around.

the amount on the players person stays after relogging/restarts just noth the bank amount

 

i have gone over the installation and everything looks fine.

 

any help is appreciated

Link to comment
Share on other sites

  On 10/5/2014 at 8:55 PM, carl101 said:

i could do with some help on this, i have applied the fixes in this thread but no coins are being sent to database and lose when relogging or server restart.

 

i can alter the coin amount in the database and when the player relogs, the new amount will show on him but not the other way around.

the amount on the players person stays after relogging/restarts just noth the bank amount

 

i have gone over the installation and everything looks fine.

 

any help is appreciated

make sure to run code from #6 as a query, that way game will be allowed to change fields in banking_data

Link to comment
Share on other sites

Hey All I am trying to execute the following code on my "mySql" database since none of my new users banking data is saved, I have all the fixes that are at the beginning of this thread installed. when I try to execute this code

CREATE TRIGGER banking
AFTER UPDATE ON player_Data
FOR EACH ROW
INSERT INTO banking_Data

( PlayerUID, PlayerName, BankSaldo, LastUpdated)
VALUES
(NEW.PlayerUID, NEW.PlayerName, 0, NOW());

 

I get the following error    [Err] 1235 - This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'.

 

I am having to manually enter my players data in the banking field and this is getting to be way more work than should be needed.

 

Does anyone have a working solution for this?

 

I am using Souls files

 

thanks.

Link to comment
Share on other sites

  On 10/5/2014 at 10:20 PM, carl101 said:

 

do i just simply add that into the query box and press submit?

 

i assume you mean this code

ALTER TABLE  `banking_data` CHANGE  `BankSaldo`  `BankSaldo` BIGINT( 24 ) NULL DEFAULT  '0'

Yup, that's all there is to it, copy > paste into query and run it. If using heidiSQL, check Data tab before and after doing this, you will see that a new tick will be added

Link to comment
Share on other sites

  On 10/6/2014 at 1:31 AM, rhammer2003 said:

I get the following error    [Err] 1235 - This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'.

delete old trigger before adding new one

Link to comment
Share on other sites

  On 10/10/2014 at 3:55 AM, rhammer2003 said:

Hello, does anyone have any info on this? I am still having issues with banking data not saving for new players yet, I have patched with the info at the beginning of this thread and I can not run the sql command

 

Why can't you run the command? What error does it give you?

Link to comment
Share on other sites

  On 10/10/2014 at 3:06 PM, rhammer2003 said:

Hi Rocu, thanks for your response, please see my previous messages in this thread. I listed the error, I am not a sql guru annd could use some assistance in getting the command to run properly.

 

Ah yes sorry, my bad. In that case, do as suggested - remove the existing event first. As recommended previously, you should try and use HeidiSQL for that.

Link to comment
Share on other sites

Banking_data not saving Can anyone tell me why 
Thanks for your help

 

dayz_server\bankzones\banks.sqf

  Reveal hidden contents



server_playerSetup.sqf 

  Reveal hidden contents

More detailed files (BattlEye,missioni-server.pbo): https://github.com/HaYToKoRaZ/no-save-bank/

 

mysq banking_data 

  Reveal hidden contents

 

q2d3D3.png

 

 

mysq Character_DATA

  Reveal hidden contents

 

Lol26J.png

 

Link to comment
Share on other sites

  On 10/11/2014 at 7:10 AM, rhammer2003 said:

but how do I remove the existing event? I do not see where I have an existing one

 

If you can't find the existing events with HeidiSQL then just insert this query: 

SHOW EVENTS

And that should list all of the events you have. Look for the event name that you want deleted and then just insert this query:

DROP EVENT IF EXISTS yourEventName;
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
  • Advertisement
×
×
  • Create New...