Book a Demo

Author Topic: When running script, older version runs despite saving changes.  (Read 2929 times)

mse

  • EA User
  • **
  • Posts: 308
  • Karma: +1/-0
    • View Profile
When running script, older version runs despite saving changes.
« on: February 21, 2020, 02:07:12 am »
I am running my script after making some changes, but it seems like it is running the previous version. I take out entire lines of code and make clear changes, but it's like the script engine does not use the latest one. Am I missing something here?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: When running script, older version runs despite saving changes.
« Reply #1 on: February 21, 2020, 03:26:19 am »
I'm not using the internal script engine. However, when editing a shape script I found that I can close the edit window with the closing icon (the red x) and EA will silently ignore my changes. Yeah, sucks, but I found it after several "what?"-moments. Maybe it's something along those lines with the script editor?

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: When running script, older version runs despite saving changes.
« Reply #2 on: February 21, 2020, 03:53:28 am »
Hi,


This is an old bug. IIRC EA will store the updated script (which would make it a different bug from the one in the shape script editor), but use an older version. Restarting EA resolves it.

When running a script EA first compiles it, resolving those !INC references. It appears that something goes wrong at this stage causing the compilation to fail and the old file to remain, but EA doesn't realize this and runs the script as if it had succeeded.

Exactly what goes wrong I'm not sure. Could be that the compiler hangs -- I know that EA doesn't do job control very well. It used to be that you couldn't invoke a script-type document template fragment from within a script calling DocumentGenerator because EA couldn't run a script from within another script that way (if they were both in the same language?). I'm not sure whether that's still the case, but point is, this is an area where EA doesn't excel.

But I've always been able to resolve it by restarting.

HTH,


/Uffe
My theories are always correct, just apply them to the right reality.