Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: jastey
« on: March 14, 2017, 06:01:24 AM »

Ah, good hint. I solved it manually because I was too impatient and rewrote / copied parts of my changes (praised be backups).

But I still wouldn't know how I did it, I am testing with BGT so no text formatting and I am working with the normal editor... but thank you for the info, up to know I only knew MS Office could do that.
Posted by: Argent77
« on: March 14, 2017, 05:52:42 AM »

It sounds like you have saved the script in UTF-8 with BOM. It consists of a character code at the beginning of the text that isn't visible in most text editors, but can't be parsed by the WeiDU script compiler. Use Notepad++ or other advanced text editors to convert it into UTF-8 without BOM or ANSI.
Posted by: jastey
« on: March 14, 2017, 04:33:46 AM »

OK, I solved for this script by creating a new one, skipping the comment, typing the first IF and copying the rest of the script block. Now it compiles.

Problem is my huge script - no way I'm going to type it all again.

Also, any ideas how this happened? I'd like to prevent it in teh future, if possible.
Posted by: jastey
« on: March 14, 2017, 04:28:50 AM »

All of a sudden (I don't know what I did differently than before) I get an "lexing: empty token" error message for a lot of my scripts. It's the scripts I worked on yesterday, but I am not aware I did anything differently (edited them with Windows Editor like I do for the last 13 years).

Example: one script in question is:
Quote
/* new ToB game: check for summoning in AR4500.bcs */
IF
   Global("C#AjantisNewGameToB","GLOBAL",0)
   Global("ENDOFBG1","GLOBAL",0)
THEN
   RESPONSE #100
      SetGlobal("C#AjantisNewGameToB","GLOBAL",1)
      Continue()
END

I get the following error message:
Quote
[AjantisBG2\bgt_eet_continuity\C#ar4000_cont.baf]  ERROR at line 1 column 0--1
Near Text:
   Failure("lexing: empty token")
ERROR: parsing [AjantisBG2\bgt_eet_continuity\C#ar4000_cont.baf]: Failure("lexing: empty token")
Stopping installation because of error.

I tried copy&pasting the text into a new file, open it with WordPad and copy&paste it into a new file, delete empty spaces at the and and beginning, rewrite comments...

I am at end of my wits why there is an error message, and what I can do to prevent it. Any help appreciated.