ScriptUO
Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: Neo on August 16, 2011, 09:52:07 PM
-
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:
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
-
Used this and working for me;)
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
-
Thank you Crome... I guess my %string var isn't getting updated or something...
neo
-
Thank you Crome... I guess my %string var isn't getting updated or something...
neo
Seems like but i cant tell you why:/
-
Just figured it out...
There was a typo:
set Right %string 2
I guess I really need some sleep lol...
Cheers!
neo