Exscriptor - new external script editor

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

User avatar
Moonrat
Posts: 1354
Joined: Sun, 20. Apr 08, 16:20
x4

Post by Moonrat »

That rename issue on save is kinda' what I am seeing.....
Whimsy
Posts: 167
Joined: Mon, 9. Feb 04, 20:32
x3tc

Post by Whimsy »

bunkerprivate wrote:- the command 'is new script version available' is never recognised by the editor (though it is in the CommandList)
This is a CommandList error - it should be "is a new script version available". I've fixed it now. :)
bunkerprivate wrote:- '[THIS]->is task 0 in use' reports
Error on line 52 - Insufficient parameters for command (should be 3)
I just missed the "=" sign, but the error is a bit confusing... presumably it counts the reference, param, and return value as parameters.
I don't really know what else to call them - though I agree it's a bit confusing. Any ideas?
bunkerprivate wrote:- unused var checker reports the error on line 0 unless you assigned it with a literal.
I know this happens with script arguments, since they're "defined" outside the text of the script, but I'm a bit confused by the rest... (see below)
bunkerprivate wrote:- '$undefined->some command' reports 'unused var $undefined' instead of the expected undefined var error.

- '$defined->some command' will report an unused variable unless it has been used as parameter somewhere else.
I'm not sure I follow this - or if I'm following correctly, I can't replicate it. For example, if $x is used only here:

Code: Select all

$x -> remove from any formation
it'll tell me it's being used before being defined, but if I add:

Code: Select all

$x = [THIS]
$x -> remove from any formation
It's fine, even if it's not used anywhere else. Could you give me an example of where it's going wrong? Or even upload the script again? :?
bunkerprivate wrote: - rename checker has something against my script ^^
1. save bunker.resupply.tanker.cmd as bunker.resupply.tanker.cmd.xml
2. there is an error: renames to bunker.resupply.tanker
3. save again to bunker.resupply.tanker.cmd.xml
4. there is another error: renames to bunker.resupply.tanker.cmd
5. goto 1 ^^

I only found that it does this with that .cmd suffix.
I think what must be happening is that the command I'm using to strip off the extension is being a bit arbitrary: maybe it's working on length alone, for example. Anyway, I've stopped using that now and only strip off ".xml" and ".txt" so it should work now. I tested it with a script named "bunker.resupply.tanker.cmd" and that worked, at least. :)
bunkerprivate wrote:- Also, the rename question does not say whether it will rename the scriptname to the filename, or the filename to the script name.
Are you sure? It should say: "The script name does not match the file name: the script may not appear in X3 unless the names match. Rename script to match file name?" i.e. it will rename the script to be the same as the new file name. I could rephrase it to make it clearer maybe; perhaps using the actual name, e.g. "Rename the script to filename: 'bunker.resupply.tanker.cmd'?" - would that be better?
bunkerprivate wrote:- if there is a script name check, there is no question to overwrite an existing file.
Again, I'm puzzled by this - it should work, and it seems to work when I test it. If I try to save another script as "bunker.resupply.tanker.cmd" (which already exists) for example, even though it has a different script name, it'll ask me whether I want to overwrite first and then warn me the names differ. Maybe I'm missing something though - what steps did you take to get this?
bunkerprivate wrote:- Version incrementor does not work until you initially put a number into the box (in a new file, the box is simply empty to begin with).
Fixed this too now (I just added in a 0 by default in the version box).
bunkerprivate wrote:- To (finally) reproduce the missing object list bug: hide object list, minimise, maximise, unhide object list.
I still don't really know why it does this but I've fixed it now. Another slippery bug squashed! :)
bunkerprivate wrote:Thanks for continuing to bear my pedantry!
And thanks for taking the time to point out the bugs! :D I won't release V1.022 just yet though - I'll wait for your reply about the unused/undefined variables first so I can get that fixed too. By then some new bugs in V1.021 will probably have popped up too anyway...
bunkerprivate
Posts: 27
Joined: Fri, 4. Jul 08, 16:01

Post by bunkerprivate »

Hm.. I think I must not have had my coffee when I wrote that last one.

Here is a test case for the definedness errors:

Code: Select all

* Unused variable '$undefined' on line 0
* Also, unused $x on line 0.
$x = $undefined->call script 'something' :

* Error is right, but it doesn't report the $x this time.
$x = $undefined2->get sector

* Error is right
$assignedALiteral = 0
* Error right, but is on line 0
$assignedAFunctionReturn = array alloc: size = 2

return null
I don't really know what else to call them - though I agree it's a bit confusing. Any ideas?
Perhaps the best solution would be 'command is ill-formed' or something generic like that. It's just caused me to do a double-take a couple of times, that's all ^^.
Are you sure? It should say: "The script name does not match the file name:
You're quite right... not sure how I missed that. Maybe it would be good to take a leaf out of Apple's UI design principles and not use Yes/No/Cancel for people like me who don't pay attention properly >_>.
Again, I'm puzzled by this - it should work, and it seems to work when I test it.
Positive about this one, but it looks like I mistook it for something else. It happens if you save as 'bunker.resupply.tanker.cmd' (ie, missing the .xml), so actually it will never ask to overwrite if you save with that filename. If I specify the .xml, then it will work. How odd. Incidentally, when I do specify the .xml, it never complains about the names being different; so:

1. have the names and filenames the same (bunker.resupply.tanker.cmd C:\Program Files\Steam\SteamApps\common\x3 - reunion\scripts\bunker.resupply.tanker.cmd.xml)
2. Ctrl+S
3. click 'ok'
4. error message about names different
5. click 'no'
6. there is no check to ask to overwrite

And with the same but at 3. type .xml on to the end of the name, then you do get an overwrite question and there is no message about the names.

Oh, I just noticed I am still using 1.020 so it might be that it got fixed as a side-effect of something else in 21!

Edit: definitely reproducible on 1.021.
draffutt
Posts: 4293
Joined: Wed, 21. Feb 07, 17:46
x4

Post by draffutt »

Whimsy wrote: You can often update a script like this just by refreshing it from file in the View menu. I've changed it to auto-refresh any open scripts that are in non-unsaved state (i.e. no changes to them) when you reload the data; if you've changed a script (i.e. it's in an unsaved state), then it leaves it alone, to preserve any changes. It can't save it automatically because if the {literals} have changed (like your race name example), it won't compile, in which case you'll have to update it manually; if no changed literals are used, you can just save and refresh it as normal.

Sadly, to do this whole process automatically would be a lot more difficult, but hopefully the extra refresh will at least make it easier some of the time. :(
Works like a champ and i believe it is much better the way you came up with.
Whimsy wrote:
draffutt wrote: 2nd: under "view" / "compare with" when the open menu comes up can you include opening .bak files in the selection box as well?
I've added this in now, and for normal open as well. It should be able to figure out the difference between a backup text and backup xml file, too. Also, your close all tabs function is in there too, as promised. :)
these also work as advertised. thanks for the quick updates.

I have another bug for you; this one appears to be only cosmetic. if a scripts defines the player HQ as in:

Code: Select all

$isHQ = [THIS] ->is of type {Headquarters}
exscriptor displays it as:

Code: Select all

$isHQ = [THIS] ->is of type {Yaki Headquarters}
Rather then:

Code: Select all

$isHQ = [THIS] ->is of type {Player Headquarters}
maybe its picking the last item on the list from the objects / stations choices since Yaki headquarters is last on that list?

i realize that if you try to change it to {Headquarters} i get a compile error which is reasonable since it is not on the objects / stations list. but if you change it to Player headquarters and save it changes the command in the in game scripter to {(Player names) Headquarters} shouldn't be a big deal with that.
None of us is as smart as all of us. ~Ken Blanchard

TC player bug fixes
Reunion player bug fixes
Whimsy
Posts: 167
Joined: Mon, 9. Feb 04, 20:32
x3tc

Post by Whimsy »

bunkerprivate wrote:

Code: Select all

* Unused variable '$undefined' on line 0
* Also, unused $x on line 0.
$x = $undefined->call script 'something' :

* Error is right, but it doesn't report the $x this time.
$x = $undefined2->get sector

* Error is right
$assignedALiteral = 0
* Error right, but is on line 0
$assignedAFunctionReturn = array alloc: size = 2

return null
Okay, I think I've got these fixed now (the call command ones were the most sneaky). Now this code should give 6 warnings - an unknown script call, two undefineds ($undefined and $undefined2 on their correct lines), and three unuseds ($x on line 3 and the two $assigneds). I think that's right now.
bunkerprivate wrote:Perhaps the best solution would be 'command is ill-formed' or something generic like that. It's just caused me to do a double-take a couple of times, that's all ^^.
Okay, I changed this to say "Ill-formed command - some parts are missing (should be X parts - check return var etc)". There's a similar version if you have too many "parts" as well. Hopefully that should make more sense now! :)
bunkerprivate wrote:You're quite right... not sure how I missed that. Maybe it would be good to take a leaf out of Apple's UI design principles and not use Yes/No/Cancel for people like me who don't pay attention properly >_>.
I've clarified it a bit so now it will show you the name it wants to use; I've left it as Yes/No/Cancel though because you need all three options (rename, don't rename but still save, don't save).
bunkerprivate wrote:Positive about this one, but it looks like I mistook it for something else. It happens if you save as 'bunker.resupply.tanker.cmd' (ie, missing the .xml), so actually it will never ask to overwrite if you save with that filename.
I think this is the extension issue again. I was using a built in overwrite checker (part of the dialogue box) but I've replaced it with some custom code to do the job instead, which should be more reliable... :D
draffutt wrote:I have another bug for you; this one appears to be only cosmetic. if a scripts defines the player HQ as in:
Okay, this is weird - it turns out the PHQ actually is assigned to the Yaki as its race in the T files. However, there's also another headquarters that does seem to belong to the player. What I've done is renamed these in the editor - the "Yaki" one is now "Player Headquarters" and the other one, whatever it was, is now "Old Headquarters". So you should be fine using "Player Headquarters" now. :)

V1.022 is here.
draffutt
Posts: 4293
Joined: Wed, 21. Feb 07, 17:46
x4

Post by draffutt »

Couple of small issues:

1st: if a scripter uses reserved symbols in a T-file like:

<t id="1"> [select value="Deploy"]Deploy & Maintain Satellite[/select]\n<t>

Exscriptor reports that the & between the Deploy and Maintain as a parsing entityname.

in the next update can you put in the manual (i read the manual twice so if i missed this sorry) somewhere that this is normal and to be expected.

2nd: Using the example above to test out a theory. i introduced this error into the t-file 7212 from XTM. this t-file adds a bunch of new sector, ship, and equipment names. It appears Exscriptor ignores the whole T-file all together. None of the new names appear any longer in the objects list under the respective parent. But when i remove the offending line the t-file loads and the new names are listed again.

so maybe have Exscriptor continue to report the "errors" it finds and still load the t-file aways. or have Exscriptor ignore those lines it finds with errors and load the rest of the t-file.


Wish list:

1st: when i resize the script window; exscriptor remembers this

2nd: under the objects button the ability to right click sort by ascending/decending for sector names and object classes -or- can you preformat it alphabetically like it is for wares and stations? i would go with the second option. but that is me. :D

3rd: include a number next to each of the individual parent name under the objects button. I.E. Sector Names [150] (showing 150 childern are assigned). it would make it much easier if i know there are 150 sectors listed and i try and say add 2 more but for whatever reason only 1 of the 2. -or- alteast wares, stations, and sector names considering those contain the largest lists and updated/changed the most.
None of us is as smart as all of us. ~Ken Blanchard

TC player bug fixes
Reunion player bug fixes
Whimsy
Posts: 167
Joined: Mon, 9. Feb 04, 20:32
x3tc

Post by Whimsy »

draffutt wrote:1st: if a scripter uses reserved symbols in a T-file like:

<t id="1"> [select value="Deploy"]Deploy & Maintain Satellite[/select]\n<t>

Exscriptor reports that the & between the Deploy and Maintain as a parsing entityname.

in the next update can you put in the manual (i read the manual twice so if i missed this sorry) somewhere that this is normal and to be expected.
It is in the manual but I admit it's not very explicit (just a mention in the "Bad XML" bug section that these symbols can also cause problems in language files); I've extended this now though to make it clearer. I wouldn't say it's "normal" though - it seems to be quite common but it's still technically an error.
draffutt wrote:so maybe have Exscriptor continue to report the "errors" it finds and still load the t-file aways. or have Exscriptor ignore those lines it finds with errors and load the rest of the t-file.
I've also made this clearer in the manual and in the error itself now (where it will say "loading aborted"), but when it reports this error it means it couldn't load the file. Unfortunately it cannot recover from this - Exscriptor cannot continue loading the file if it contains invalid XML, so it's up to the user (or preferably whoever made the XML file in the first place) to fix it.

In the future I might try to come up with a way around the most common error (the & on its own), but I don't want it to automatically change the file itself, so the file will still be invalid; web browers won't be able to load it properly either, for instance. So the only way to properly solve the problem is to fix the file. :(
draffutt wrote:1st: when i resize the script window; exscriptor remembers this
Good idea - this'll be in V1.023. :)
draffutt wrote:2nd: under the objects button the ability to right click sort by ascending/decending for sector names and object classes -or- can you preformat it alphabetically like it is for wares and stations? i would go with the second option. but that is me. :D
Also a good idea - I'll include this in V1.023 too.
wrote:3rd: include a number next to each of the individual parent name under the objects button. I.E. Sector Names [150] (showing 150 childern are assigned).
And this too. :wink:

I won't release V1.023 just yet in case there's any more bugs to fix (it has only been a few hours since the last version after all). :D
draffutt
Posts: 4293
Joined: Wed, 21. Feb 07, 17:46
x4

Post by draffutt »

Whimsy wrote: In the future I might try to come up with a way around the most common error (the & on its own), but I don't want it to automatically change the file itself, so the file will still be invalid; web browers won't be able to load it properly either, for instance. So the only way to properly solve the problem is to fix the file. :(


i wouldn't want it to change the t-file either. the user might have actually made a mistake and not realized it. but oh well i guess i'll just have to start fixing those t-files that are causing me the problems. :)

have 2 more wish list items.

1st: can you have it so when the last script is closed it automaticlly opens a new blank script page like it does when you first start exscriptor? i noticed on my computer at least when working with exscriptor for a while and the last script is closed it is like getting blasted by a wall of grey and for me at least it is hard on the eyes.

2nd: again when working with scripts for a while if you have a lot of scripts open (like i seem to have) after awhile it is hard to distinguish which script is open. so maybe put a symbol in front, have it underlined, change the font color, or even if it is possible to change the tab color for the active script. maybe even include and option on which the user would prefer.
None of us is as smart as all of us. ~Ken Blanchard

TC player bug fixes
Reunion player bug fixes
DesertEagle
Posts: 117
Joined: Thu, 2. Feb 06, 05:32
x3

At my wit's end

Post by DesertEagle »

http://www.travisgood.com/X3/DEscripts.zip

Hi All,
I've used Whimsy's editor (latest version) to completely revamp my 'Match speed of target' script, linked above.

But there is trouble in paradise. I think that the editor has introduced some sort of malformed XML into these files... When I first throw them into the directory, everything is a go. I run MTS3 to register the hotkey, and then go to controls-->interface-->(bottom of Interface tab)-->Match speed of target
to set up the hotkey. And the hotkey works. Tap once to match speed, tap again to go back to max speed.
But after the first time that I do this, they never load again. In fact, the game won't even load again (New Game button) with these script files in the scripting directory. But only after they've been run once... Taking the files out, renaming them, resaving, and putting them back in solves the problem... before they are used again.

I'm really confused, and tired. If anyone could back up their savegames and try putting these in the script directory to see if they work, I would much appreciate it. XML gurus ... is there some anomaly here?

Thank you so much for your time.

Bleary-eyed coder,
T.

NOTE: ****BACKUP YOUR SAVE GAMES BEFORE ATTEMPTING TO UNZIP THESE SCRIPTS INTO YOUR DIRECTORY**** I have had save games corrupted by whatever is causing this issue.
draffutt
Posts: 4293
Joined: Wed, 21. Feb 07, 17:46
x4

Post by draffutt »

Possible bug report.

Under objects / ships: where are all the ships gone? on mine only list about a 1/2 to 2/3 of the ships from vanilla is listed (only 1 xenon ship (the J model) and no Khaak ships are there). also when i install XTM for example none of their new ships are listed.

Wishlist:

since Exscriptor already checks to see if there are error's present in the t-files would it be possible to include a check to see if it is in the proper format and report this?

i had been modifing a script with Excrip and somehow someway i saved the t-file as a unicode which natually cause x3 to CTD when it tried to load that script package. i thought maybe Exscrip had caused this but it turn out to the the user me :( . Ansi and UTF-8 are the only formats it appears are accepted by x3.
None of us is as smart as all of us. ~Ken Blanchard

TC player bug fixes
Reunion player bug fixes
bunkerprivate
Posts: 27
Joined: Fri, 4. Jul 08, 16:01

Re: At my wit's end

Post by bunkerprivate »

DesertEagle wrote:I think that the editor has introduced some sort of malformed XML into these files...
Try removing the comment on line 31 of MTS1.xml. X3 chokes on XML special characters where Exscriptor does not, so >, <, ", &... If you edit the script in MSCI then these special characters are not converted into something safe, though when MSCI reads scripts it seems to be OK at converting them back. It is quite unlikely that the savegames are corrupted; it's just that the problem is not in the actual code and therefore turns up at very unexpected moments!

--

I have only some very minor bugs in the last few days of messing with X3!

- if a label begins with end, then the indentation gets broken.

- compiler does not seem to check the existence of jump labels (any more?)

- 'null' is syntax-highlighted in strings

- not really an error, but if you take a new script and save with 0 arguments, then edit it but don't save. Then call it from another script, you get errors because of course the old version which is on disk is checked. It would be nice to have the compiler report that the script is open but unsaved.

- '$arr = $ship->get formation followers' reports 'Invalid character in [constant]: $'. It is an incorrect command.

- after using find/replace a fair but, I managed to make it throw unhanded exceptions. After that, no find/replace would work until a restart. Just close the find/replace dialog using the 'X' instead of the close button. Here is the pastebin for the exception backtrace but I have a feeling this is a trivial one: http://pastebin.ca/1178437
Whimsy
Posts: 167
Joined: Mon, 9. Feb 04, 20:32
x3tc

Post by Whimsy »

draffutt wrote:1st: can you have it so when the last script is closed it automaticlly opens a new blank script page like it does when you first start exscriptor?
Okay, I've done this - it's an option you can enable.
draffutt wrote:so maybe put a symbol in front, have it underlined, change the font color, or even if it is possible to change the tab color for the active script. maybe even include and option on which the user would prefer.
Unfortunately I've not found an easy way of doing this yet - it seems oddly difficult to change anything about the tabs themselves. I'll see what I can come up with in a later version.
DesertEagle wrote:I'm really confused, and tired. If anyone could back up their savegames and try putting these in the script directory to see if they work, I would much appreciate it. XML gurus ... is there some anomaly here?
I think bunkerprivate's diagnosis was right - the comment in the MTS1.xml file is definitely causing the problem. To help prevent this problem in the future I've made two changes:

- commented commands are once again saved properly, so X3 shouldn't store it all as simple text in the file;
- Exscriptor will warn you if you use &, < or > in a comment.

Hopefully, if you open up the original (working) MTS1.xml and save it with V1.023, this problem should be fixed now, but if not just let me know. :)
draffutt wrote:Under objects / ships: where are all the ships gone? on mine only list about a 1/2 to 2/3 of the ships from vanilla is listed (only 1 xenon ship (the J model) and no Khaak ships are there). also when i install XTM for example none of their new ships are listed.
I don't think this is a bug in the Exscriptor (though I might be wrong); it works fine for me, even with XTM. Are you sure it's not a problem with the language files? If they're fine and it is the editor, then you'll need to give me a bit more to go on - are there any error messages? What's in the log?
draffutt wrote:since Exscriptor already checks to see if there are error's present in the t-files would it be possible to include a check to see if it is in the proper format and report this?
I've added a little bit of checking to warn you if the file is in a wrong format. I'm not sure how well it'll work (it only checks for one specific unicode format) but hopefully it'll give you some warning. :wink:
bunkerprivate wrote:- if a label begins with end, then the indentation gets broken.
Good point - it's fixed now, I think.
bunkerprivate wrote:- compiler does not seem to check the existence of jump labels (any more?)
Never did - I must have forgotten that one! Anyway, it does check it now.
bunkerprivate wrote:- 'null' is syntax-highlighted in strings
Yeah, that pesky null is a law unto itself. Unfortunately fixing it for strings is a lot more difficult than it was for comments so - for now, at least - it gets to stay. :(
bunkerprivate wrote:It would be nice to have the compiler report that the script is open but unsaved.
I agree it would be nice, but sadly this one takes a bit more effort than it's worth, since it means giving the compiler access to all the other open scripts. I might include this in a later version once I've tidied up the structure a bit, though.
bunkerprivate wrote:- '$arr = $ship->get formation followers' reports 'Invalid character in [constant]: $'. It is an incorrect command.
That's weird - on mine it just says "Unrecognised symbol in expression: get", the stock response to anything that confuses it. It's still not very informative though; if I eventually get around to overhauling the code, fixing this boring expression error to say something more useful is one of my priorities. :)
bunkerprivate wrote:Here is the pastebin for the exception backtrace but I have a feeling this is a trivial one
Your instincts were spot on - I'd forgotten to check if the dialogue had been disposed of (rather than just hidden). All fixed now!

Anyway, V1.023 is here. I should also mention that I've added a normal "Save" command in addition to the "Save As" since I got annoyed by the constant appearance of the save as dialogue box when I just wanted to overwrite... :D
draffutt
Posts: 4293
Joined: Wed, 21. Feb 07, 17:46
x4

Post by draffutt »

Whimsy wrote:
draffutt wrote:Under objects / ships: where are all the ships gone? on mine only list about a 1/2 to 2/3 of the ships from vanilla is listed (only 1 xenon ship (the J model) and no Khaak ships are there). also when i install XTM for example none of their new ships are listed.
I don't think this is a bug in the Exscriptor (though I might be wrong); it works fine for me, even with XTM. Are you sure it's not a problem with the language files? If they're fine and it is the editor, then you'll need to give me a bit more to go on - are there any error messages? What's in the log?
Ok a quick glace before i wipe X3 and try and again. but as for your question. all language files are set to 44. they only error i recieve at the moment is a conflict in file blah, blah, blah... so no log is generated.

there is a bug thou now. if you resize your script window and you reload x3 data Exscriptor returns to default settings and forgets its settings.
None of us is as smart as all of us. ~Ken Blanchard

TC player bug fixes
Reunion player bug fixes
DesertEagle
Posts: 117
Joined: Thu, 2. Feb 06, 05:32
x3

Post by DesertEagle »

Alright, appreciate the help all. Clearing the comment fixed everything. I've run out of time but will probably mainstream the new script next week.

Cheers,
T.
draffutt
Posts: 4293
Joined: Wed, 21. Feb 07, 17:46
x4

Post by draffutt »

Ok clean install of x3 now. no other scripts at the moment and the object listing for ship works as intended. now i will have to figure out what is causing it to get truncted.

Another bug was found thou. in BO'F's bof.ship.clamper the in game scripter displays line as this:

Code: Select all

 0023 $page.id = 8897
but exscript shows it as:

Code: Select all

 0023 = 8897
and when i try to save or compile this it give this error - Error in expression: expected a number, [constat], 'string', {literal}, null, or {subexpression} but found =.
None of us is as smart as all of us. ~Ken Blanchard

TC player bug fixes
Reunion player bug fixes
User avatar
Moonrat
Posts: 1354
Joined: Sun, 20. Apr 08, 16:20
x4

Post by Moonrat »

Things were looking just great. Easy editing, the "Save" function not stripping off part of the file name, then.....

Evertime I load in my script into Exscriptor I get the message :

"Loading files...
Load failed! Object reference not set to an instance of an object.
Load failed"

Loading any other script looks Ok and the X3 SE looks Ok from what I can see. Is there anyway to expand the message a little to see what's going wrong ie. line number or the "object reference" that's causing the issue

Or failing that any other suggestion. Loading the .bak file produces the same results
User avatar
Moonrat
Posts: 1354
Joined: Sun, 20. Apr 08, 16:20
x4

Post by Moonrat »

Apologies (moderator). To the above here is the error...

Error Log
---------

Exception occurred:
Message: Object reference not set to an instance of an object.
Stack Trace: at X3_Script_Editor.ScriptCommand.calculateParameterOrdering()
at X3_Script_Editor.ScriptCommand..ctor(String cmdID, Int32 adjustedLineNumber, XData xdatabase)
at X3_Script_Editor.Decompiler.translateCommand(XmlNode commandArray, ArrayList variables, Int32 alineNum, Boolean isComment)
at X3_Script_Editor.Decompiler.decompile()
at X3_Script_Editor.Decompiler.decompile(String filename)
at X3_Script_Editor.Editor.LoadFiles(String[] fileNames)
Source: X3 Script Editor V3
Target: Int32[] calculateParameterOrdering()

-------------------------------------------

Thanks
Whimsy
Posts: 167
Joined: Mon, 9. Feb 04, 20:32
x3tc

Post by Whimsy »

draffutt wrote:Another bug was found thou. in BO'F's bof.ship.clamper the in game scripter displays line as this:

Code: Select all

 0023 $page.id = 8897
but exscript shows it as:

Code: Select all

 0023 = 8897
I can't believe I missed that - I changed something and I got caught out by a <= instead of a <. :( Easily fixed, fortunately. I've also fixed the resizing bug you mentioned.
Moonrat wrote:Evertime I load in my script into Exscriptor I get the message :

"Loading files...
Load failed! Object reference not set to an instance of an object.
Load failed"
This is very strange - looking at the log, I think I know what's happening, but not why - is there any chance you can upload your script somewhere for me to test? I've also added in a new check in V1.024 that might give us a little more information, but without seeing the script that's causing the problem it's hard to know how to fix it.
draffutt
Posts: 4293
Joined: Wed, 21. Feb 07, 17:46
x4

Post by draffutt »

Possible Bug:

starting from a new line. if you say click on (for example) object commands / built-in commands / then command_none. the command is displayed as this:

Code: Select all

 {COMMAND_NONE}
next without touching anything in the script window you do this next say click on script commands / general commands / maths <RetVar/IF <Expression>

the command gets displayed like this:

Code: Select all

 {COMMAND_NON<RetVer/IF> <Expression>E}
shouldn't it have done this instead?:

Code: Select all

 {COMMAND_NONE}<RetVer/IF> <Expression>
put the cursor at the end of the line instead of 2 spaces before the }?



For the next update can you change this command from:

Code: Select all

 $ret = [THIS]->call script 'plugin.test' : ID=$ID
as displayed by Exscriptor

-to this-

Code: Select all

 $ret = [THIS]->call script 'plugin.test' : Ware name=$ID
as it is displayed by the in-game scriptor.

the ID= as displayed by exscriptor was causing me to scatch my head on what it was looking for. what var was supposed to be defined/assigned to it.

wish list:

if you have more then one script open; say 10 scripts, and you decide you are done working on script 2 and you close it. can you change it so that it opens the next script in line rather then opening the last script every time.
Last edited by draffutt on Thu, 21. Aug 08, 01:39, edited 2 times in total.
None of us is as smart as all of us. ~Ken Blanchard

TC player bug fixes
Reunion player bug fixes
User avatar
Moonrat
Posts: 1354
Joined: Sun, 20. Apr 08, 16:20
x4

Post by Moonrat »

Many thanks mate, it's been driving me potty....that said keep up the good work. This editor I'm sure is meaning those like me that gave up writing anything cos' the X3 SE was so cr@p are now producing stuff....you shall go to heaven !!..or the stars.... I was going to drop you my files but I think I can now replicate the issue easily for you. Believe it or not it seems to be linked to "null" comments !!

Create "new1" containing the lines...

0001 $X = 1
0002 * A test
0003 $X = $X + 1
0004 return null

Close it / save it

Now open it and drop a single "*" comment chr. in at line 0002, so...

0001 $X = 1
0002 *
0003 * A test
0004 $X = $X + 1
0005 return null

Close it /save it

Now try and re-open it !! :skull:

I've just taken out all of my "null" comments ie. lines starting with just a "*" and nowt' else and now it's Ok again. I think the "feature" appeared in 1.023 onwards as 1.022 passes the test above OK. That'll be the reason I think why everything ground to a halt. From the changelog in 1.023...
Restored use of commented commands - these should now work in X3. However they may not be perfect so beware...I suppose I was warned ! :oops: (No I didn't listen to anything my Mother told me).

I noticed that there was no changelog for 1.024 ?

Hope all this helps

Return to “X³: Reunion - Scripts and Modding”