Accepted the "Will you help us" for a Fahrelen mission (Not sure what the mission was, it wouldn't start).

Next screen was as shown in first attached image. The scr Desc is the mission complete text.

The "Yes, I'm ready" action led to the next screen.
See Fahrelen mission screen 2.jpg. %startGate% isn't displaying correctly in the scrDesc.

Selecting "Done" undocked the playership and gave the error:

10/14/2017 11:19:11 OnCreate [Defend Migration Route]: Unknown function [intPermutePairs] ### (@ thePair 0) ###
10/14/2017 11:23:06 OnMigrationArrived [Defend Migration Route]: Unknown ship class ID [Nil] ### (sysCreateShip (@ speciesData "leaderType") startObj (@ speciesData "sovereign") 3213738) ###

No stargate was highlighted as a destination and no ships apeared that I am aware of.

The mission summary screen showed a Defend Migration Route mission but there was no screen description for it.
Docking at the station again gave the mission In Progress text.
Unable to complete the mission.

EDIT Added more images. See below.

Fahrelen mission screen.JPG
Fahrelen mission screen.JPG
Fahrelen mission screen 2.JPG
Fahrelen mission screen 2.JPG
three missions Fahr.jpg
three missions Fahr.jpg
log
Debug - Copy.log
nms 22 Oct 2017:

(mathPermutePairs) is supposed to recurse but calls the wrong function name. Added to my pull request.

relanat 23 Oct 2017:

cinnabar had spotted this bug a while back.

See also https://ministry.kronosaur.com/record.hexm?id=74288

nms 23 Oct 2017:

I'm not quite sure why you're getting the second error. It looks like (@ speciesData "leaderType") should be defined. But I did find an error in the mission data that I would expect to cause a different error and the leader's followers not to appear. I'll submit a fix for that, although George doesn't look at my non-core PRs very often.

If you still have the mission and can load the game in debug mode, could you try opening the mission screen, selecting it, and running this in the console:

(setq m (@ (scrGetListEntry gScreen) 3))
(msnGetData m 'species)
(objGetStaticData m 'SpeciesData)

and report the results. Then if you want to resolve it, you can do (msnSuccess m).

relanat 23 Oct 2017:

I'm away from my computer so started a new game.

Attached a screenshot of the debug output for three missions to the OP, three missions Fahr.jpg.

The first mission worked. 28 ithalodons arrived at one stargate. They travelled to another stargate and were attacked en route by small orange-brown ships (Remora C1s or C5s or something I think). One ithal killed. Mission successfully completed. All screens looked correct.

objGateTo another system.

Second mission the same except no enemy were seen and the 22 ithals wobbled unmolested to the other stargate.

objGateTo another system again.

Third mission as described in the OP. Wrong scrDesc, no gate highlighted, no mission completion, same error message.

Also attached the debug log for this game. Note the 'OnReward - too many arguments' error which seems to have occurred in the second mission when no enemy appeared.

For info, after the third mission (msnSuccess m) returned True in the debug screen but the mission was still there. After that it returned Nil and the mission was still there.

nms 23 Oct 2017:

Thanks. I think the problem with no ships appearing is entirely due to the bug in mathPermutePairs. If the system has more than 2 stargates, it returns an error, causing the <OnCreate> event to return an error before getting to the point where it destroys itself or sets the relevant data. George has already pulled my fix for this, so that'll be in the next release.

The other bug I thought I saw was actually fine because <StaticData> is automatically unevaluated.

The "Too many arguments" error is due to a bug in rpgMissionRewardXP in RPGMembership.xml. I'll see if there's another way to pass that data to the screen that needs it.

The enemy attacks are just random (2% chance every second).