TIP: Click on subject to list as thread! ANSI
echo: synchronet
to: vela025
from: Nightfox
date: 2024-10-18 09:16:00
subject: Help using gettext.js

  Re: Help using gettext.js
  By: vela025 to Digital Man on Fri Oct 18 2024 01:14 am

 ve> No I was a little worried it would corrupt a settings file somewhere. But
 ve> I've backed up everything now and this:

 ve> if(confirm("Are you using a BBC Micro Mode 7 terminal"))
 ve>    user.lang = "bbcmicro";
 ve>    user.settings &= ~USER_AUTOTERM | USER_ANSI | USER_RIP | USER_WIP |
 ve>      USER_HTML | USER_PETSCII | USER_UTF8;
 ve>    user.settings &= ~USER_EXASCII;
 ve> else
 ve>    user.lang = "";

 ve> Gives line 16:SyntaxError (which is the else line). Else is not indented
 ve> and at the margin inline with IF. Indenting also give the same error. In

If you have more than one line in an 'if', 'while', etc., they need to be within curly braces, which may explain that error.  For example:

if(confirm("Are you using a BBC Micro Mode 7 terminal"))
{
   user.lang = "bbcmicro";
   user.settings &= ~USER_AUTOTERM | USER_ANSI | USER_RIP | USER_WIP |
         USER_HTML | USER_PETSCII | USER_UTF8;
   user.settings &= ~USER_EXASCII;
}
else
   user.lang = "";

Nightfox

---
 þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
                                                                            
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)

SOURCE: echomail via QWK@pharcyde.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.