use of keywords in MessageBox string

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
Post Reply
User avatar
asmo
Posts: 229
Joined: 18 Sep 2014, 21:20

use of keywords in MessageBox string

Post by asmo »

I don't know if the TES3 engine prohibited the use of keywords in a string.

statement

Code: Select all

MessageBox "OnActivate"
CS script check complains

Code: Select all

Error | (line) 85 | Unexpected keyword ("OnActivate")
the game engine

Code: Select all

error line 85, column 24 ("OnActivate")
    Unexpected keyword
compiling failed: asmo_conmer_chest_script
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: use of keywords in MessageBox string

Post by Zini »

It just never ends. And this time I really have no idea how to fix this. Any approach I can think of would break other features. Sorry, but I think this is the first case where I have to declare that we won't fix it. At least not before OpenMW 1.1.
User avatar
asmo
Posts: 229
Joined: 18 Sep 2014, 21:20

Re: use of keywords in MessageBox string

Post by asmo »

Okay ;-)

https://bugs.openmw.org/issues/2991
w/ priority "low" and target "openmw-future"
densm27
Posts: 24
Joined: 02 Jun 2014, 18:34

Re: use of keywords in MessageBox string

Post by densm27 »

Just wondering how could English version of Morrowind work with that? There is no single script MessageBox'ing words like "begin" or "end" or "else"?
upd:
oh, I see, everything is OK if keyword is not alone in that string
User avatar
asmo
Posts: 229
Joined: 18 Sep 2014, 21:20

Re: use of keywords in MessageBox string

Post by asmo »

densm27 wrote:Just wondering how could English version of Morrowind work with that? There is no single script MessageBox'ing words like "begin" or "end" or "else"?
upd:
oh, I see, everything is OK if keyword is not alone in that string
https://bugs.openmw.org/issues/2991#note-2
Looks like this was no problem in the TES3-engine.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: use of keywords in MessageBox string

Post by Zini »

Yeah. Our script engine is actually supposed to be a superset of the original one. Some of the original limitations were mind bending (showing that the developers had no idea how a proper compiler works) and replicating all that crap would have taken much longer than the more capable implementation we have now.
However when I originally wrote the scripting engine, I wasn't aware of some of the idiosyncrasies of the original, which has caused problems like this.
User avatar
asmo
Posts: 229
Joined: 18 Sep 2014, 21:20

Re: use of keywords in MessageBox string

Post by asmo »

It's not that much of a problem, shipped scripts do not seem to contain a keyword only (makes sense).
As densm27 pointed out it's easy to avoid like this: MessageBox "_OnActive_". I think most of the keywords are used for debug statements, so no big deal. You just have to know that...

IMO Lowest priority, paaaast v1.0 ;)
Post Reply