It is currently Mon 04 Nov, 2024 - 10:04 pm

All times are UTC [ DST ]




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
Author Message
 Post subject: Re: Block Count
PostPosted: Fri 26 Aug, 2011 - 12:00 am 
Agent

Joined: Thu 17 Feb, 2011 - 1:31 am
Posts: 2301
Location: Colorado
this is a pretty major problem but can be avoided a little by using /h all thanks for finding this :D

_________________

Image


Image



Top
  Offline Profile Send private message  
 
 Post subject: Re: Block Count
PostPosted: Fri 26 Aug, 2011 - 6:37 am 
Admin
User avatar

Joined: Wed 15 Dec, 2010 - 9:06 am
Posts: 1769
Location: Surrey, England
Can you explain exactly what needs to be done to recreate this please? ^^


Top
  Offline Profile Send private message  
 
 Post subject: Re: Block Count
PostPosted: Fri 26 Aug, 2011 - 7:42 am 
Banned
User avatar

Joined: Thu 21 Jul, 2011 - 10:05 pm
Posts: 43
I've noticed this too. Every time you log out and log back in, the amount of blocks you modified on your last login is doubled. Basically this means that EVERYONE'S block count is double what it should be. I haven't reported this before because I haven't confirmed this before.

_________________
Image


Top
  Offline Profile Send private message  
 
 Post subject: Re: Block Count
PostPosted: Fri 26 Aug, 2011 - 4:12 pm 
Agent

Joined: Sat 08 Jan, 2011 - 5:25 pm
Posts: 236
Location: Texas
But... but... I want to keep my 20 mil block count D:

_________________
Image


Top
  Offline Profile Send private message  
 
 Post subject: Re: Block Count
PostPosted: Sat 27 Aug, 2011 - 8:40 am 
Admin
User avatar

Joined: Wed 15 Dec, 2010 - 9:06 am
Posts: 1769
Location: Surrey, England
That's because he already had modified 10,000 blocks and they were added to his total blocks.

For the block count, the blocks you have modified are stored in the database. When you come online that database value is put into a variable, which will be your total block count. There is another variable which stores how many blocks you have modified since logging on. These two variables are added together to create your total block count. When you log off, that value is written to the database.

If a player has 10,000 blocks total, and 0 blocks since logging on, he will have 10,000 blocks when logging off.

If a player has 10,000 blocks total, and 264 blocks since logging on, he will have 10,264 when logging off. The report on /whois will still show that he has 10,264 total blocks, and 264 since logging on. From there it's simple math to see how many blocks he had when he joined. Take the blocks he done since logging on, and take them away from his total block count.

I'll review over the block count code after the weekend, it's Manchester Pride today, and we're going to get Chris' car tomorrow. :D


Top
  Offline Profile Send private message  
 
 Post subject: Re: Block Count
PostPosted: Sat 27 Aug, 2011 - 7:35 pm 
Admin
User avatar

Joined: Wed 15 Dec, 2010 - 9:06 am
Posts: 1769
Location: Surrey, England
If a user has a total blocks of 10,264 and has modified 264 since logging on, the total blocks in that list include the blocks since logging on. When he logs out, 10,264 is stored to his name on the database, and then used again next time.

Next time he logs on he should have 10,264, and 0 since logging on... He starts building again, doing another 264 since logging on. The list will now show 10,528 total and 264 since logging on. Again, this adds the number 10,264 and 264 together.

The ingame fariable of '$blocks' will also show the users total block count.


Top
  Offline Profile Send private message  
 
 Post subject: Re: Block Count
PostPosted: Thu 01 Sep, 2011 - 6:41 am 
Banned
User avatar

Joined: Thu 21 Jul, 2011 - 10:05 pm
Posts: 43
Zion, it sounds like you have a doubled up variable there. it sounds like your "total blocks" variable is updated every time a user modifies a block, as is the "in this session" variable. but in addition to directly adding the amount to your "total blocks", it sounds like the server adds the "in this session" variable to the "total blocks" on logout, creating the double-blocks issue.

_________________
Image


Top
  Offline Profile Send private message  
 
 Post subject: Re: Block Count
PostPosted: Fri 02 Sep, 2011 - 9:36 am 
Admin
User avatar

Joined: Wed 15 Dec, 2010 - 9:06 am
Posts: 1769
Location: Surrey, England
I see. I'll check over the code relating to block counts. ^^


Top
  Offline Profile Send private message  
 
 Post subject: Re: Block Count
PostPosted: Sat 03 Sep, 2011 - 1:42 am 
Agent

Joined: Thu 17 Feb, 2011 - 1:31 am
Posts: 2301
Location: Colorado
yh except it also counts the blocks that they edited while they are on. E.g if you do /whois before placing a block then place a block and do /whois it will show that for example before the block placing you have 0 blocks then when you place it it will show it as 1 block in both edited total and for edited in the current session.

_________________

Image


Image



Top
  Offline Profile Send private message  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
© 2014 - Hawknet Computing Ltd - Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group