Subj : Help using gettext.js
To   : vela025
From : Nightfox
Date : Fri Oct 18 2024 09:16 am

 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