Door Games Unlimited

Welcome, Guest.


Subject: Time is not a function Date: Sun Jan 04 2015 19:12:36
From: Digital Man To: Kirkman

  Re: Time is not a function
  By: Kirkman to All on Sat Jan 03 2015 12:16 pm

 > I have noticed that when I'm working on JS projects for the board, if I do
 > something dumb that crashes the script, sometimes it affects other
 > javascript components on the board.
 >
 > For example, say I'm writing a game, and I leave out a curly brace or
 > something. The BBS will throw an error. I'll fix my code, but then later
 > when I go to post a message, SlyEdit crashes on launch with the error "time
 > is not a function."
 >
 > I have seen this "time is not a function" many times with other JS parts of
 > the board, like games. It only happens if I did something in my own code
 > that errored out first.

How is *your code* being executed? If executed correctly (e.g. via an external 
configured with a "?script" command-line) the script should execute in its own 
JS context and not be able to corrupt others.

time() is a global function (a.k.a. method) in the Synchronet object model, so 
it is possible that if your script executes in the same context and somehow 
deletes or overwrites the time() function that could trigger the error, but I 
don't think that would be normal.

 > The only fix is to reboot the machine.

Really? Just restarting Synchronet should fix any JS context stuff. Or even 
just logging off and back on again. Or recycling the terminal server. Rebooting 
the entire computer is certainly overkill.

                                            digital man

Synchronet "Real Fact" #24:
The Digital Dynamics company ceased day-to-day opperations in late 1995.
Norco, CA WX: 59.6°F, 44.0% humidity, 5 mph NNW wind, 0.00 inches rain/24hrs

---
 ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net

Previous Message       Next Message
In Reply To: Time is not a function (Kirkman)
Replies: Time is not a function (Kirkman)