Author Topic: Error viewing and exporting PS:T scripts  (Read 3694 times)

Offline Qwinn

  • Planewalker
  • *****
  • Posts: 111
Error viewing and exporting PS:T scripts
« on: June 23, 2008, 03:48:48 AM »
I don't know if NI is being maintained anymore, but thought I'd point this out, for the record:

NI incorrectly replaces periods with commas when viewing PS:T's often-used NearLocation triggers.  For example, when viewing or exporting 0400NT.BCS in NI, you'll see a NearLocation trigger look like this:

  NearLocation(Myself,[2252,2110],0)

The [2252,2110] should be [2252.2110].  If you try to export any script that uses the NearLocation trigger, and then compile it, you will get compile errors as a result.

Qwinn

Offline Taimon

  • Planewalker
  • *****
  • Posts: 326
Re: Error viewing and exporting PS:T scripts
« Reply #1 on: June 23, 2008, 07:26:18 AM »
Are you sure about that one?
Because when I look in the BIFF, the points are seperated by comma and not period.

Offline Qwinn

  • Planewalker
  • *****
  • Posts: 111
Re: Error viewing and exporting PS:T scripts
« Reply #2 on: June 23, 2008, 07:51:21 AM »
What are you using to look in the BIFF?

And yes, I am sure that if you export and then compile it, with commas separating the X and Y coordinates, it will fail.

If you decompile it with WeiDU, do a REPLACE_TEXTUALLY looking for it with a period and replacing it with same, and recompile it, it works fine.  View it again after doing that, and they -still- look like commas in the viewer.

Qwinn
« Last Edit: June 23, 2008, 07:59:23 AM by Qwinn »

Offline Taimon

  • Planewalker
  • *****
  • Posts: 326
Re: Error viewing and exporting PS:T scripts
« Reply #3 on: June 23, 2008, 09:30:19 AM »
What are you using to look in the BIFF?
Hex Editor. (0400NT.BCS is the 5B entry in the cs_0400.bif on my install.)

Quote
And yes, I am sure that if you export and then compile it, with commas separating the X and Y coordinates, it will fail.

If you decompile it with WeiDU, do a REPLACE_TEXTUALLY looking for it with a period and replacing it with same, and recompile it, it works fine.  View it again after doing that, and they -still- look like commas in the viewer.
Because WeiDU will probably do the period <-> comma transformation when decompiling / compiling and thus not expecting to see coordinates separated by comma when compiling baf files.

Offline Qwinn

  • Planewalker
  • *****
  • Posts: 111
Re: Error viewing and exporting PS:T scripts
« Reply #4 on: June 23, 2008, 10:10:18 PM »
*shrug*  Alright, if what you're saying is that WeiDU is deliberately changing the Point parameter in a trigger used only in PST (IWD2 has it too, but in a different format) to a period, and back, it seems unlikely, but I don't know enough about it's inner workings to state otherwise.

And I wouldn't want WeiDU to change that, because if you're right, then that trigger's syntax is inconsistent with every other trigger and action, all of which separate bracketed X and Y coordinates with a period.

Qwinn

Offline Taimon

  • Planewalker
  • *****
  • Posts: 326
Re: Error viewing and exporting PS:T scripts
« Reply #5 on: June 24, 2008, 02:13:54 AM »
Quote
And I wouldn't want WeiDU to change that, because if you're right, then that trigger's syntax is inconsistent with every other trigger and action, all of which separate bracketed X and Y coordinates with a period.
Neither would I. As long as you use the same tools for compilation and decompilation you won't run into trouble.
But since this is only a two-line-edit and I think it's good for NI to be compatible with WeiDU, I changed my local copy to mirror that comma <-> period change.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

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:
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)?: