Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / making a date system that works out how long since you've last played

Author
Message
AdamG
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: United Kingdom
Posted: 23rd Apr 2010 23:37
I'm working on a rpg and am trying to code a system that saves the current system date & time when you save & quit game

then when you load up game again, it gets current date & time, and works out how long since you've played the game

But the problem is the get time$() and get date$() commands are string, i've tried using val command, but it only grabs the first part of the date up to the / ie, 04/22/10 it just reports back 04

How do i make the val command read the rest of the date & time?

Any suggestions or help would be appreciated.

This is the code i have so far

Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 24th Apr 2010 00:11
look at the mid$ command

Rawwrr. Sig Fail.
Newcastle is awesome
AdamG
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: United Kingdom
Posted: 24th Apr 2010 02:12
aha, great

didn't think to use mid$

Thanks.

Login to post a reply

Server time is: 2026-07-28 07:09:03
Your offset time is: 2026-07-28 07:09:03