The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Age count
Author Message
Leonidas
Master
**

Posts: 277
Likes Given: 3
Likes Received: 13 in 12 posts
Joined: May 2013
Reputation: 1



Post: #11
RE: Age count
Well thanks for your opinion. I'll just wait for someone who is willing to help to reply.
(This post was last modified: 11-11-2016 12:15 PM by Leonidas.)
11-11-2016 12:10 PM
Find all posts by this user Like Post Quote this message in a reply
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #12
RE: Age count
The thing is here that you can't use 31 or 30 or 28 for specific months, or 365, 366 days in a year since you are counting played days and not the actual age of the account (days since the creation of the account)... unless that is what you want...

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
11-14-2016 06:22 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Leonidas
Master
**

Posts: 277
Likes Given: 3
Likes Received: 13 in 12 posts
Joined: May 2013
Reputation: 1



Post: #13
RE: Age count
Yeah I'm wanting it to count even when they are offline, so it shows how old their account is. If there isn't a way of showing months and what not I'll just have to stick with it showing days.
11-14-2016 08:33 AM
Find all posts by this user Like Post Quote this message in a reply
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #14
RE: Age count
Have you tried in game .show age to see what it displays?

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
11-14-2016 08:58 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #15
RE: Age count
sphere already store the account first/last connection date (<ACCOUNT.FIRSTCONNECTDATE> and <ACCOUNT.LASTCONNECTDATE>), so you must compare these 2 dates and convert it to an "readable" value, which probably the best format will be "X days"

eg: to compare dates 2016/05/10 and 2016/08/10, you must convert both dates into days using the formula: (year * 365) + (month * 30) + days

2016/05/10 = (2016 * 365) + (05 * 30) + 10 = 736000
2016/08/10 = (2016 * 365) + (08 * 30) + 10 = 736090

736090 - 736000 = 90, so the interval between these dates is 90 days

on sphere scripting it will be something like this:
Code:
[FUNCTION GetAccountAge]
return <eval <ConvertToDays <ACCOUNT.LASTCONNECTDATE>> - <ConvertToDays <ACCOUNT.FIRSTCONNECTDATE>>>

[FUNCTION ConvertDateToDays]
ARGS=<EXPLODE : /, <ARGS>>  // this will explode the date "yyyy/mm/dd HH:mm:ss" into "yyyy,mm,dd,HH,mm,ss", making it easy to get values using ARGV[0], ARGV[1], ...
return <eval (<ARGV[0]>*365)+(<ARGV[1]>*30)+<ARGV[2]>>
so with this code you will be able to get the account age using something like "SYSMESSAGE Your account age is: <GetAccountAge> days"
11-18-2016 02:53 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)