Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Jscript ➜ Timer triggers (help needed)

Timer triggers (help needed)

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Valhart   (14 posts)  Bio
Date Mon 30 Jul 2001 07:59 AM (UTC)
Message
After countless attempts at DIY on timer scripts, I failed to accomplish my set goal. Therefore, I make a plead to any good scripter that read this message. Please help me to create a good timer script based on.

The entire script is based on an actions of events and then timer to set warnings in the mud.

1) The script will operate once a text in the mud like
{You chant the words 'Voluntas ferrum!'
Valhart puts a protective spell on (target name).}

2) The timers will start to countdown from a duration of 15 mins.

3) The script will respond to a (report iw) message anywhere in a sentence and make the avator reports
{say IW spell left (duration in seconds))

4) At the instance of remaining 30 seconds on the timer, the avator reports
(say IW spell left 30 seconds!)

Thank you for reading and I will appreciate the help given to a non script expert like me.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Mon 30 Jul 2001 11:39 PM (UTC)

Amended on Wed 01 Aug 2001 10:16 PM (UTC) by Nick Gammon

Message
This has been an interesting challenge. I assumed that you would probably want to cast the spell on more than one person at once - which made it trickier - hence the complexity of the result.

What I have done below is three parts:

Trigger to match when spell is cast

You need to go into World configuration -> Appearance -> Triggers and add a trigger:


Match on: Valhart puts a protective spell on (.+)
Enabled: checked
Regular expression: checked
Change colour to: (your choice of colour)
Label: CastSpell
Script: OnSpell


This trigger will fire when it sees the appropriate string, and calls the script function "OnSpell" (below). This script adds a one-shot timer set to go off in 14 minutes 30 seconds (which is when you want the warning message).

The script also remembers the name of the person who you cast the spell on (passed down as a wildcard) and the current time. These two things are put into variables, where the variable name has a unique number appended to make sure that we don't have a clash of variable names.

eg.


Timer name:
SpellTimer_32

Variables:
SpellTimer_Name_32 = Gandalf
SpellTimer_Time_32 = 31/07/01 9:30:21


(in this case 32 was the unique number).

Timer script

We now need a script to be called when the timer expires, this is called "OnSpellTimer".

  • It works out from the timer name what the unique number was (32 in the above example).
  • It then scans the variable list to find the matching variable names, and extracts out the name of the person the spell was protecting.
  • It then displays the message "say IW spell left for Gandalf 30 seconds!!"
  • It then deletes the two variables set up by the trigger


Query script

To handle your last requirement we have a third script routine "OnSpellQuery" - called from an alias "report iw".

This script scans all variables to find the appropriate ones, and displays all outstanding spells and times to go in seconds, eg.


IW spell left for Nick is 877 secs
IW spell left for Fred is 880 secs
IW spell left for John is 883 secs


I have done this as a "world.note" which only shows you the information. To change it so that everyone sees it you would change it to "world.send" and put "say" in front of the message.

To call this from an alias you would add an alias, like this:


Match on: report iw
Enabled: checked
Label: Report
Script: OnSpellQuery


Because of the design of this, you won't see the last 30 seconds of the spell, because the timer expires after 14 minutes 30 seconds, but presumably that isn't a big deal.

The script follows (VBscript):





sub OnSpell (strTriggerName, strTriggerLine, aryWildcards)

dim who
dim number

' who did we cast the spell on?

  who = aryWildcards (1)

' get a unique number

  number = world.GetUniqueNumber

' Flags: 
'    1 = enabled
'    4 = one shot (once only)
' 1024 = replace any of same name

' add a timer to go off in 14 minutes 30 seconds

  world.AddTimer "SpellTimer_" & number, 0, 14, 30, "", _
                  1 + 4 + 1024,  "OnSpellTimer"

' remember when we cast the spell
   
  world.setvariable "SpellTimer_Time_" & number, Now
  world.setvariable "SpellTimer_Name_" & number, who

end sub

sub OnSpellTimer (strTimerName)
dim splitname
dim mylist
dim number
dim i
dim character

splitname = split (strTimerName, "_")
number = CInt (splitname (1))  ' find our unique number

mylist = world.GetVariableList

' scan variables list to find timer number

if not IsEmpty (mylist) then
  for i = lbound (mylist) to ubound (mylist)
    splitname = split (mylist (i), "_")
    if ubound (splitname) = 2 then
      if splitname (0) = "spelltimer" and splitname (1) = "name" then
        if CInt (splitname (2)) = number then
          ' work out character name
          character = world.GetVariable (mylist (i))
          ' tell them time is up
          world.send "say IW spell left for " & character & " 30 seconds!!"
          ' delete associated variables
          world.deletevariable splitname (0) & "_Name_" & splitname (2)
          world.deletevariable splitname (0) & "_Time_" & splitname (2)
        end if
      end if  ' found a spelltimer variable
    end if    ' split into 3 pieces
  next        ' end of loop
End If        ' have any variables

end sub

sub OnSpellQuery (thename, theoutput, thewildcards)
dim mylist
dim i
dim splitname
dim starttime
dim timeleft
dim character

mylist = world.GetVariableList

if not IsEmpty (mylist) then
  for i = lbound (mylist) to ubound (mylist)
    splitname = split (mylist (i), "_")
    if ubound (splitname) = 2 then
      if splitname (0) = "spelltimer" and splitname (1) = "name" then
         starttime = CDate (world.GetVariable _
                           (splitname (0) & "_Time_" & splitname (2)))
         character = world.GetVariable (mylist (i))
         timeleft = 900 + DateDiff("s", Now, starttime)
         if timeleft < 0 then
           world.note "IW spell for " & character & " has expired"
         else
           world.note "IW spell left for " & character & " is " _
                      & timeleft & " secs"
         end if  
      end if  ' found a spelltimer variable
    end if    ' split into 3 pieces
  next        ' end of loop
End If        ' have any variables

end sub

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Valhart   (14 posts)  Bio
Date Reply #2 on Tue 31 Jul 2001 03:42 PM (UTC)
Message
New problems arose
~~~~~~~~~~~~~~~~~~

In another senerio like when there is a need for different type of spells that uses timer, and only a script can be open at a type, which part should i alter to stack the spells to work in different time length on each charactor i cast on.
example of spell number 2~
{
You are done invoking your magic.
You chant the words 'Major kretsz rex xero'*
The simplicity of raji aids you.
You protect Admonius.*
}

I noticed that the triggers invoked will be timed even the caster was not me but in the same room as I, I got hold of the spell message when I cast
{
You are done invoking your magic.
You chant the words 'Voluntas ferrum!'*
Mordruin shimmers brightly for a moment.*
}
It will be wonderful it the triggers read and work from the Lines with * sign preferably to make sure that other players invoking the same spells will not make the triggers go happy timing.

Thanks again for the earlier script, was a clear example that I can follow to learn from. ^_^
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #3 on Tue 31 Jul 2001 10:38 PM (UTC)

Amended on Wed 01 Aug 2001 10:16 PM (UTC) by Nick Gammon

Message
To make it more general I would move the code to add the timer into another subroutine "NewSpell", and then put in a trigger for each different spell, that calls NewSpell with the appropriate arguments (spell name, target name, and duration). See example below.



sub NewSpell (spellname, target, minutes)

dim number

' get a unique number

  number = world.GetUniqueNumber

' Flags: 
'    1 = enabled
'    4 = one shot (once only)
' 1024 = replace any of same name

' add a timer to go off after the appropriate time

  world.AddTimer "SpellTimer_" & number, 0, minutes - 1, 30, _
                  "",  1 + 4 + 1024,  "OnSpellTimer"

' remember when the spell expires, the target and the spell name
   
  world.setvariable "SpellTimer_Time_" & number, _
                    DateAdd ("n", minutes, Now)
  world.setvariable "SpellTimer_Name_" & number, target
  world.setvariable "SpellTimer_Spellname_" & number, spellname

end sub

sub OnSpellIW (strTriggerName, strTriggerLine, aryWildcards)
  call NewSpell ("IW", aryWildcards (1), 15)
end sub




Later on, to calculate the time remaining you no longer need to subtract 900, as we have now remembered the time the spell ends, not when it starts, to that line would change to:


timeleft = DateDiff("s", Now, starttime)


In fact, the variable "starttime" should be renamed "endtime" to make it more readable.

In a couple of spots you would want to extract out the appropriate spell name, to put into the displays instead of "IW", something like this:


spellname = CDate (world.GetVariable _
(splitname (0) & "_SpellName_" & splitname (2)))


Also, you would want to delete that third variable when the timer fires.

As for your final problem, I would have thought that the script would only be called when you invoke the spell, because of the line:


You protect Admonius.*





- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Valhart   (14 posts)  Bio
Date Reply #4 on Wed 01 Aug 2001 05:21 PM (UTC)
Message
Okies, there are two final problem i had left since I been meddling the whole script process up til now. ^_^

Let me explain more thoroughly now.

Two spells's chant
1)
You are done invoking your magic.
You chant the words 'Major kretsz rex xero'
The simplicity of raji aids you.
You protect Admonius.

2)
You are done invoking your magic.
You chant the words 'Rubber'
The simplicity of raji aids you.
You protect Admonius.

Problem 1:
The only difference lies only on the line 2 of each spell's chant. However, the player name, Admonius, which is the target lies in line four. I tried in vain to solve this trigger problem as I only know how to match one line only. Is they anyway to grab of the the target name and the difference in this set of spells?

Problem 2:
spellname = CDate (world.GetVariable _
(splitname (0) & "_SpellName_" & splitname (2)))

I have lots of errors inserting this two line. I figured that I must have done incorrectly and therefore, placed the entire script I been altering from yours so far...

Thanks in advance. ^_^


sub NewSpell (spellname, target, minutes)

dim number

' get a unique number

  number = world.GetUniqueNumber

' Flags: 
'    1 = enabled
'    4 = one shot (once only)
' 1024 = replace any of same name

' add a timer to go off after the appropriate time

  world.AddTimer "SpellTimer_" & number, 0, minutes - 1, 30, "",  _
                 1 + 4 + 1024,  "OnSpellTimer"

' remember when the spell expires, the target and the spell name
   
  world.setvariable "SpellTimer_Time_" & number, _ 
DateAdd ("n", minutes, Now)
  world.setvariable "SpellTimer_Name_" & number, target
  world.setvariable "SpellTimer_Spellname_" & number, spellname

end sub

sub OnSpellIW (strTriggerName, strTriggerLine, aryWildcards)
  call NewSpell ("IW", aryWildcards (1), 15)
end sub

sub OnSpellMIPR (strTriggerName, strTriggerLine, aryWildcards)
  call NewSpell ("MIPR", aryWildcards (1), 4)
end sub

sub OnSpellMAPR (strTriggerName, strTriggerLine, aryWildcards)
  call NewSpell ("MAPR", aryWildcards (1), 4)
end sub

sub OnSpellTimer (strTimerName)
dim splitname
dim spellname
dim mylist
dim number
dim i
dim character

spellname = CDate (world.GetVariable _ 
(splitname (0) & "_SpellName_" & splitname (2)))

splitname = split (strTimerName, "_")

number = CInt (splitname (1))  ' find our unique number

mylist = world.GetVariableList

' scan variables list to find timer number

if not IsEmpty (mylist) then
  for i = lbound (mylist) to ubound (mylist)
    splitname = split (mylist (i), "_")
    if ubound (splitname) = 2 then
      if splitname (0) = "spelltimer" and splitname (1) = "name" then
        if CInt (splitname (2)) = number then
          ' work out character name
          character = world.GetVariable (mylist (i))
          ' tell them time is up
          world.send "party say " & spellname & " spell on " _
                     & character & ", left 30 seconds (DANGER)"
          ' delete associated variables
          world.deletevariable splitname (0) & "_Name_" & splitname (2)
          world.deletevariable splitname (0) & "_Time_" & splitname (2)
        end if
      end if  ' found a spelltimer variable
    end if    ' split into 3 pieces
  next        ' end of loop
End If        ' have any variables

end sub

sub OnSpellQuery (thename, theoutput, thewildcards)
dim mylist
dim i
dim splitname
dim spellname
dim endtime
dim timeleft
dim character

mylist = world.GetVariableList

spellname = CDate (world.GetVariable _ 
(splitname (0) & "_SpellName_" & splitname (2)))

if not IsEmpty (mylist) then
  for i = lbound (mylist) to ubound (mylist)
    splitname = split (mylist (i), "_")
    if ubound (splitname) = 2 then
      if splitname (0) = "spelltimer" and splitname (1) = "name" then
         starttime = CDate (world.GetVariable _
                           (splitname (0) & "_Time_" & splitname (2)))
         character = world.GetVariable (mylist (i))
         timeleft = DateDiff("s", Now, endtime)
	 if timeleft > 0 then
           world.send "party say " & spellname & " spell on " _
                       & character & ", left " _
                       & timeleft & " seconds" (TIMER)
         end if  
      end if  ' found a spelltimer variable
    end if    ' split into 3 pieces
  next        ' end of loop
End If        ' have any variables

end sub
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #5 on Wed 01 Aug 2001 10:13 PM (UTC)

Amended on Wed 01 Aug 2001 10:21 PM (UTC) by Nick Gammon

Message
First, to know which spell was chanted. Since they come in separate lines you need two triggers, which simplifies things a bit, as the second trigger will now work for all spells.

The first trigger just needs to remember the spell name. The latest version of MUSHclient (3.15) will let you do that without even writing a script. Just do this:


Match on: You chant the words '*'
Send: %1
Enabled: checked
Send to: Variable (label is name)
Label: LastSpellName


What that will do is put into the variable "LastSpellName" whatever spell name was last chanted.

The second trigger tells you who you have protected, thus it can be:


Match on: You protect *.
Enabled: checked
Label: Spell
Script: OnSpell


Now, OnSpell can work out *what* spell was chanted from the variable LastSpellName. It can then work out the spell duration. See example below.

Your problems with the spellname come from two places:


  • You don't need to "CDate" (convert to a date) the spell name - I only did that for the spell start time
  • The test for spell name needs to be in the inner loop, where it cycles through all variables.


I have marked my changed to your subs in bold.






sub OnSpell (strTriggerName, strTriggerLine, aryWildcards)
dim chant
dim spellname
dim minutes

  ' spell chant was from previous trigger
  chant = world.GetVariable ("LastSpellName")

  ' work out spell duration based on chant
  Select Case chant
      Case "Major kretsz rex xero"  
           minutes = 15
           spellname = "IW"
      Case "Rubber"   
           minutes = 5
           spellname = "MIPR"
      Case "Astno ex ilium"   
           minutes = 10
           spellname = "MAPR"
      Case Else     
           minutes = 5
           spellname = "Unknown spell"
  End Select

  call NewSpell (spellname, aryWildcards (1), minutes)
end sub


sub OnSpellTimer (strTimerName)
dim splitname
dim spellname
dim mylist
dim number
dim i
dim character

splitname = split (strTimerName, "_")

number = CInt (splitname (1))  ' find our unique number

mylist = world.GetVariableList

' scan variables list to find timer number

if not IsEmpty (mylist) then
  for i = lbound (mylist) to ubound (mylist)
    splitname = split (mylist (i), "_")
    if ubound (splitname) = 2 then
      if splitname (0) = "spelltimer" and splitname (1) = "name" then
        if CInt (splitname (2)) = number then
          ' work out character name
          character = world.GetVariable (mylist (i))
          spellname = world.GetVariable _ 
              (splitname (0) & "_SpellName_" & splitname (2))
          ' tell them time is up
          world.send "party say " & spellname & " spell on " _
                     & character & ", left 30 seconds (DANGER)"
          ' delete associated variables
          world.deletevariable splitname (0) & "_Name_" & splitname (2)
          world.deletevariable splitname (0) & "_Time_" & splitname (2)
          world.deletevariable splitname (0) & "_SpellName_" & splitname (2)
                end if
      end if  ' found a spelltimer variable
    end if    ' split into 3 pieces
  next        ' end of loop
End If        ' have any variables

end sub

sub OnSpellQuery (thename, theoutput, thewildcards)
dim mylist
dim i
dim splitname
dim spellname
dim endtime
dim timeleft
dim character

mylist = world.GetVariableList


if not IsEmpty (mylist) then
  for i = lbound (mylist) to ubound (mylist)
    splitname = split (mylist (i), "_")
    if ubound (splitname) = 2 then
      if splitname (0) = "spelltimer" and splitname (1) = "name" then
         starttime = CDate (world.GetVariable _
                           (splitname (0) & "_Time_" & splitname (2)))
         spellname = world.GetVariable _ 
             (splitname (0) & "_SpellName_" & splitname (2))
         character = world.GetVariable (mylist (i))
         timeleft = DateDiff("s", Now, endtime)
	 if timeleft > 0 then
           world.send "party say " & spellname & " spell on " _
                      & character & ", left " _
                      & timeleft & " seconds (TIMER)"
         end if  
      end if  ' found a spelltimer variable
    end if    ' split into 3 pieces
  next        ' end of loop
End If        ' have any variables

end sub



- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Valhart   (14 posts)  Bio
Date Reply #6 on Thu 02 Aug 2001 01:45 AM (UTC)
Message
After checking and reinstalling the script, I occurred a problem that I cannot understand.

Error Number -> -2146828275

Event --------> Execution of line 31 column 3

Description --> Type mismatch: 'NewSpell'

Called by ----> Function/Sub: OnSpell called by trigger
Reason: processing trigger "Spell"

Then, there is the alert message

Unable to invoke script subroutine "OnSpell" when processing trigger "Spell"

Thanks for your help again. ^_^
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #7 on Thu 02 Aug 2001 08:23 AM (UTC)
Message
It seems to work fine for me, better post the entire script so I can see what you have done. :)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Valhart   (14 posts)  Bio
Date Reply #8 on Thu 02 Aug 2001 08:56 AM (UTC)
Message
The entire script ^_^, though i got an inkling feeling is of the * sign, does it copy a few words and spaces?


sub OnSpell (strTriggerName, strTriggerLine, aryWildcards)
dim chant
dim spellname
dim minutes

  ' spell chant was from previous trigger
  chant = world.GetVariable ("LastSpellName")

  ' work out spell duration based on chant
  Select Case chant
      Case "Voluntas ferrum!"
           minutes = 15
           spellname = "IW"
      Case "Rubber"
           minutes = 4
           spellname = "MIPR"
      Case "Major kretsz rex xero"
           minutes = 4
           spellname = "MAPR"
      Case "Air"
	   minutes = 4
	   spellname = "MIXR"
      Case "Major lossa aiir"
	   minutes = 4
	   spellname = "MAXR"
      Case "Flesh and Blood"
	   minutes = 4
	   spellname = "MIHR"
      Case "grrrwm grrrwm"
	   minutes = 4
	   spellname = "MAHR"
      Case Else
           minutes = 0
           spellname = "Unknown spell"
  End Select

  call NewSpell (spellname, aryWildcards (1), minutes)
end sub


sub OnSpellTimer (strTimerName)
dim splitname
dim spellname
dim mylist
dim number
dim i
dim character

splitname = split (strTimerName, "_")

number = CInt (splitname (1))  ' find our unique number

mylist = world.GetVariableList

' scan variables list to find timer number

if not IsEmpty (mylist) then
  for i = lbound (mylist) to ubound (mylist)
    splitname = split (mylist (i), "_")
    if ubound (splitname) = 2 then
      if splitname (0) = "spelltimer" and splitname (1) = "name" then
        if CInt (splitname (2)) = number then
          ' work out character name
          character = world.GetVariable (mylist (i))
          spellname = world.GetVariable _ 
              (splitname (0) & "_SpellName_" & splitname (2))
          ' tell them time is up
          world.send "party say " & spellname & " spell on " _
                     & character & ", left 30 seconds (DANGER)"
          ' delete associated variables
          world.deletevariable splitname (0) & "_Name_" & splitname (2)
          world.deletevariable splitname (0) & "_Time_" & splitname (2)
          world.deletevariable splitname (0) & "_SpellName_" & splitname (2)
                end if
      end if  ' found a spelltimer variable
    end if    ' split into 3 pieces
  next        ' end of loop
End If        ' have any variables

end sub

sub OnSpellQuery (thename, theoutput, thewildcards)
dim mylist
dim i
dim splitname
dim spellname
dim endtime
dim timeleft
dim character

mylist = world.GetVariableList


if not IsEmpty (mylist) then
  for i = lbound (mylist) to ubound (mylist)
    splitname = split (mylist (i), "_")
    if ubound (splitname) = 2 then
      if splitname (0) = "spelltimer" and splitname (1) = "name" then
         starttime = CDate (world.GetVariable _
                           (splitname (0) & "_Time_" & splitname (2)))
         spellname = world.GetVariable _ 
             (splitname (0) & "_SpellName_" & splitname (2))
         character = world.GetVariable (mylist (i))
         timeleft = DateDiff("s", Now, endtime)
	 if timeleft > 0 then
           world.send "party say " & spellname & " spell on " _
                      & character & ", left " _
                      & timeleft & " seconds (TIMER)"
         end if  
      end if  ' found a spelltimer variable
    end if    ' split into 3 pieces
  next        ' end of loop
End If        ' have any variables

end sub
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #9 on Thu 02 Aug 2001 09:54 PM (UTC)

Amended on Thu 02 Aug 2001 09:55 PM (UTC) by Nick Gammon

Message
Ah, I see you have omitted the "NewSpell" function. I left it out of my more recent post because is was the same as before.

Just copy it from the earlier message and add to the script file (from "sub NewSpell .... down to .... "end sub").

The "*" is fine - it will copy anything, words spaces, whatever. You might want to make the trigger colour the matching line another colour, just to confirm that the trigger matches.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Valhart   (14 posts)  Bio
Date Reply #10 on Fri 03 Aug 2001 01:59 AM (UTC)

Amended on Fri 03 Aug 2001 06:10 PM (UTC) by Valhart

Message
Re: Estimated final minor error. *sigh*

I invoked the script. All works well. However, the sub OnSpellQuery is not workable.

Whenever I tried to use the alias to report, it would not work. I suspect it's the if timeleft > 0 but I am uncertain. I have a big feeling that the value is null or in negative in 'endtime'.

Could you explain how this timer works in terms of how it actucally times from to give me another insight? thanks. Especially on how the endtime gets it's value from.

Thanks a lot! ^_^

Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #11 on Fri 03 Aug 2001 09:18 PM (UTC)

Amended on Fri 03 Aug 2001 09:20 PM (UTC) by Nick Gammon

Message
Can you tell me in what way it doesn't work? eg. - copy and paste from the screen?

If it does absolutely nothing then maybe the alias isn't matching.

I tested it by just typing:


/OnSpellQuery "", "", ""


Then later on I made an alias.

If it is reporting something but the time is wrong (eg. negative) then the timer calculation must be out.

It works by using DateDiff to subtract the time now ("Now") from the stored end time kept in the variable, which is converted back to a time from a string with CDate.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #12 on Fri 03 Aug 2001 09:58 PM (UTC)
Message
BTW - I apologise for doing the examples in VBscript - I just noticed that I am in the JScript section of the forum. ;)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Valhart   (14 posts)  Bio
Date Reply #13 on Sat 04 Aug 2001 07:59 AM (UTC)
Message
I finally found the error. It happens to this line.

starttime = CDate (world.GetVariable _
(splitname (0) & "_Time_" & splitname (2)))

the variable starttime was all changed to endtime to have an appropriate name. *rofls*

Thanks for all your help, Nick. Sorry Jscript users who is seeing this forum messages, I wanted to learn Jscript but... vb script is on the loose. ^_-

Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


31,729 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.