Author Topic: #time var  (Read 2437 times)

0 Members and 1 Guest are viewing this topic.

Offline NeoTopic starter

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
#time var
« on: August 16, 2011, 09:52:07 PM »
0
I'm having a problem... I was trying to get a "clock" to use in a script, and I came up with something like this:

Code: [Select]
set %string #time
str left %string 2
set %h #strRes
str Mid %string 3 2
set %m #strRes
set Right %string 2
set %s #strRes
set %hour %h , h
set %min %m , m
set %sec %s , s
set %ctime %hour , %min , %sec
Display %ctime

The thing is, if you keep looping this, you'll notice that the time displayed won't change for 1 whole minute...
It islike it doesn't read the #time var for 1 minute until it reads again...

Or maybe I'm doing sth wrong?

Anyway, I'd appreciate some insight!

Cheers!

neo
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: #time var
« Reply #1 on: August 17, 2011, 02:57:12 AM »
0
Used this and working for me;)
Code: [Select]
str mid #time 1 2
set %H #strres
str mid #time 3 2
set %M #strres
str mid #time 5 2
set %S #strres
set %Time %H , #spc , : , #spc , %M , #spc , : , #spc , %S
display %time

Crome

Offline NeoTopic starter

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: #time var
« Reply #2 on: August 17, 2011, 03:10:44 AM »
0
Thank you Crome... I guess my %string var isn't getting updated or something...

neo
« Last Edit: August 17, 2011, 03:16:37 AM by frneo »
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: #time var
« Reply #3 on: August 17, 2011, 03:16:10 AM »
0
Thank you Crome... I guess my %string var isn't getting updated or something...

neo
Seems like but i cant tell you why:/

Offline NeoTopic starter

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: #time var
« Reply #4 on: August 17, 2011, 03:21:40 AM »
0
Just figured it out...

There was a typo:

set Right %string 2

I guess I really need some sleep lol...

Cheers!

neo
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Tags: