Message Area
Casually read the BBS message area using an easy to use interface. Messages are categorized exactly like they are on the BBS. You may post new messages or reply to existing messages!

You are not logged in. Login here for full access privileges.

Previous Message | Next Message | Back to Synchronet Multinode BBS Softwar...  <--  <--- Return to Home Page
   Networked Database  Synchronet Multinode BBS Softwar...   [627 / 900] RSS
 From   To   Subject   Date/Time 
Message   Nightfox    Digital Man   smbdefs.js redeclaration of SMB_SUCCESS   May 4, 2019
 12:16 AM *  

  Re: smbdefs.js redeclaration of SMB_SUCCESS
  By: Digital Man to Nightfox on Fri May 03 2019 10:56 pm

 >> !JavaScript  D:\BBS\sbbs\exec\load\smbdefs.js line 5: TypeError:
 >> redeclaration of const SMB_SUCCESS

 DM> That tells you that you're load()ing smbdefs.js when it's already been
 DM> loaded by something else. So, you've been unnecessarily
 DM> re-evaluating/executing that script all this time. 

 DM> The right fix is to use require() instead of load() for .js files that
 DM> define constants (generally, load/*defs.js). require() is smart and will
 DM> only load() the specified script if/when necessary. You use it like this: 

 DM> require("smbdefs.js", "RFC822HEADER";);

 DM> Where the second argument is something that is defined in the load-file
 DM> that you need in your script (a constant, variable or function). Then if
 DM> that something is already defined, the load-file won't be executed since
 DM> it's not necessary ('something' is already defined). 

 DM> digital man

Thanks for the explanation.

Nightfox

---
 ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
 * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  Show ANSI Codes | Hide BBCodes | Show Color Codes | Hide Encoding | Hide HTML Tags | Show Routing
Previous Message | Next Message | Back to Synchronet Multinode BBS Softwar...  <--  <--- Return to Home Page

VADV-PHP
Execution Time: 0.0814 seconds

If you experience any problems with this website or need help, contact the webmaster.
VADV-PHP Copyright © 2002-2024 Steve Winn, Aspect Technologies. All Rights Reserved.
Virtual Advanced Copyright © 1995-1997 Roland De Graaf.
v2.0.140505

Warning: Unknown: open(c:\Sessions\sess_su1mf0ekej3d2irngr1otd8ii0, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (c:\Sessions) in Unknown on line 0 PHP Warning: session_start(): open(c:\Sessions\sess_su1mf0ekej3d2irngr1otd8ii0, O_RDWR) failed: No such file or directory (2) in D:\wc5\http\public\VADV\include\common.inc.php on line 45 PHP Warning: Unknown: open(c:\Sessions\sess_su1mf0ekej3d2irngr1otd8ii0, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (c:\Sessions) in Unknown on line 0