forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


@timer(1,v)
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Wed Mar 19, 2003 10:35 am    Post subject: Reply with quote

I don't know if this sheds any light on the problem but if I run the following immediately after starting the IDE for the first time:

Code:
  TIMER START,1,CHRONO,19-00:00:00
  %%timer = @timer(1,v)


then the value of %%timer is null. In the original code extract it would then skip both the if and the elsif commands and cause a non-numeric value error in the %%total_time calculation because %%seconds will be unset. If you re-run it any number of subsequent times, everything seems OK. Perhaps I'm doing something stupid, but if not, I think we might have a VDS bug here.

_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Wed Mar 19, 2003 12:01 pm    Post subject: Reply with quote

bweckel

thanks for trying, i appreciate your effort in trying to find out what is going on here

i run win98 on my laptop and my program works just fine!

must be something about w2k i don't know...gggrrrr!!!!!!

the reason for %%time_separator_1 and %%time_separator_2 is to provide international support or is there no need for it?

jules

i am not using the timer as a chrono but as a countdown

if i was using it as a chrono then your point would be valid and i would have to allow for the @timer(1,v) being zero on the first run

thanks for your thoughts

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed Mar 19, 2003 6:39 pm    Post subject: Reply with quote

I tested the code below(which is basically your code with a few INFO's thrown in) to test on XP Pro. I didn't have any problems at all.
Has your user kicked his computer lately? lol
Actually it's probably something simple that no one is seeing.
If you want Serge, you can e-mail me the program and I can try it here. The examples are running just fine.
Careful of the code below, you have to manually stop it.
Code:

  timer start, 1, ctdown, @datetime(dd)-00:03:00
  %%timer_status = on
:timer
  wait event,1
 
  if @equal(%%timer_status,on)
      %%timer = @timer(1,v)
     info @len(%%timer)
      if @equal(@len(%%timer),15)
         %%minutes = @substr(%%timer,9,10)
         %%seconds = @substr(%%timer,12,13)
      elsif @equal(@len(%%timer),14)
         %%minutes = @substr(%%timer,8,9)
         %%seconds = @substr(%%timer,11,12)
      end
     info %%Minutes - %%seconds
      %%total_time = @fadd(@fmul(%%minutes,60),%%seconds)
     info %%total_time
      %%time_frac = @format(@fmul(@fdiv(%%total_time,@fmul(3,60)),100),2.0)
     info %%time_frac
  end
:evloop
  wait event,1
  goto @event()
:Close
  exit

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed Mar 19, 2003 6:42 pm    Post subject: Reply with quote

Quote:
my user reports that the program runs well under win 95 (as it does on my me machine) but his xp machine reports an error at the following line

XP or Windows 2K? You've said both now..just wondering if you said it wrong Smile
If the users computer is W2K then there probably isn't a point in me testing it on XP since it could just be a W2K problem. I will anyway though if you want.

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Thu Mar 20, 2003 10:55 am    Post subject: Reply with quote

hiya snarlingsheep,

ooppsssss Embarassed you're right - i meant w2k and not xp gggrrr!!!!!

thanks for your offer to run the code for me but if the code i gave you works then my whole program will work too

so may be it is a w2k thing...but aren't xp and w2k close code wise?!?

i made some changes to the way my code extracts the minutes and seconds from @timer(1,v) and sent it to my user and am now waiting to hear from him...

thanks for your help

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Thu Mar 20, 2003 11:08 am    Post subject: Reply with quote

my user just reported that my new code now works under w2k - not sure why...

in any case, for those interested, i replaced the code to:
Code:
%%timer = @timer(1,v)
    %%length = @len(%%timer)
    dialog set, text11, @substr(%%timer,@fsub(%%length,5),@fsub(%%length,2))
    %%minutes = @substr(%%timer,@fsub(%%length,5),@fsub(%%length,5))
      %%seconds = @substr(%%timer,@fsub(%%length,3),@fsub(%%length,2))


just a different way of doing the same thing

thanks for all your help

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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 vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group