unmarkSystem

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

unmarkSystem

Post by Eric Walch »

The JS function "unmarkSystem()" is not working. markSystem() however works.

Using "unmarkSystem" in a script currently leads to a systemcrash. Also with debugMenu you can mark a system (the red cross appears in the chart). When using the unmarkSystem debugMenu complains about a unknown function.

It is possible that this function still had to be tested as it was not mentioned on the wiki. But looking in the code (in: OOJSMission.m) I see almost no difference between the two and why one is working and the other not.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6628
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Shouldn't the line

Code: Select all

player = [NSString concatenationOfStringsFromJavaScriptValues:argv count:argc separator:@" " inContext:context];
in unmarkSystem be

Code: Select all

params = [NSString concatenationOfStringsFromJavaScriptValues:argv count:argc separator:@" " inContext:context];
like in its markSystem counterpart?

If you can provide a test script I could test and check in a fix really soon. This has to be a typo or copy/paste error.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Er… yes, that does seem likely. :-)
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Is it possible to use a "call" command to use the old legacy command, like:

xxxx.call("removeMissionDestination", "50")

player.call above is not working.


If not I have to jump to legacy scripting itself to clear the thing in the current release.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

That should be "removeMissionDestination:". The colon is part of the method name.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

That should be "removeMissionDestination:". The colon is part of the method name.
Thanks, I should have known as I wondered about that colon before. Just an addition. player.call() does not accept a mission variable as parameter. I had to define a local variable first an use that instead. But it works now.
Post Reply