Morrowind Dialogue Result Window (Bug?MeIdiot?)

Not about OpenMW? Just about Morrowind in general? Have some random babble? Kindly direct it here.
Post Reply
User avatar
nox7
Posts: 6
Joined: 29 Apr 2016, 22:13

Morrowind Dialogue Result Window (Bug?MeIdiot?)

Post by nox7 »

I'm using the original creation kit for Morrowind. I have this line of code:

Code: Select all

MessageBox "Only %.f days have passed!", daysPassedFinance
It is defined in the script attached to the NPC. The script only has two lines (other than the Begin/End lines). It is

Code: Select all

short daysPassedFinance
set daysPassedFinance to 3
However, when I talk to the NPC about my topic, and the MessageBox appears, it says "Only 0 days have passed!"

Why is this? I am playing my .esp mode on OpenMW. Everything else about my mod works fine, am I not understanding something about the dialoge result window? When I MessageBox a GLOBAl variable it works fine. When I set a local variable:

Code: Select all

set daysPassedFinance to 1
That works too.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Morrowind Dialogue Result Window (Bug?MeIdiot?)

Post by scrawl »

I just pasted your code into a new plugin and it's working fine. Probably something else in your mod is causing the issue. Are you sure that the script is compiling without errors (check the openmw.log)?
Attachments
test_dialoguescript.esp.zip
Test plugin (NPC ID: testnpc)
(1.95 KiB) Downloaded 120 times
User avatar
nox7
Posts: 6
Joined: 29 Apr 2016, 22:13

Re: Morrowind Dialogue Result Window (Bug?MeIdiot?)

Post by nox7 »

Was not aware that is where script errors were sent. Reran a test isolating that code. Yes, it works. The issue became apparent when I used

Code: Select all

if (something !== 3)

endif
The !== killed it. Needed !=. !== is a PHP habit of mine >.>
Post Reply