Trunk 1.74.0.3142 Mission Scripting Problem
Moderators: winston, another_commander, Getafix
Trunk 1.74.0.3142 Mission Scripting Problem
I'm running into an oddity when updating the mission scripting for Lave Academy for 1.74. I'm trying to open a mission screen with 5 choices, the first three of which will lead on to further mission screens with yes/no choices (to confirm selection of the 3 exam "missions"). If no is selected then the first screen is called again.
In theory you should be able to bounce between screens, but after the second or third time the callback function seems to become undefined (according to the barf in the js console). Something looks to be going weird here and I can't see why.
Current version avec bug is here. The screen is accessed from Lave Academy station via the marketplace screen (as in the old version, it replaces it).
In theory you should be able to bounce between screens, but after the second or third time the callback function seems to become undefined (according to the barf in the js console). Something looks to be going weird here and I can't see why.
Current version avec bug is here. The screen is accessed from Lave Academy station via the marketplace screen (as in the old version, it replaces it).
Last edited by Thargoid on Sat Apr 17, 2010 11:15 am, edited 1 time in total.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
I've got some free time, so I'll look into it.
Out of curiosity, did it use to work ok in previous trunk builds? I'm asking because there's been a recent-ish (rev.3137 if I'm not mistaken) change to the way callback is implemented...
Out of curiosity, did it use to work ok in previous trunk builds? I'm asking because there's been a recent-ish (rev.3137 if I'm not mistaken) change to the way callback is implemented...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
No idea - I've just started doing that one tonight.
I've got an earlier version on my HD somewhere, will give it a try.
Edit to add - just tried it on 2972 - there is works fine. So the changes to the callback you mention seem to have broken something.
I've got an earlier version on my HD somewhere, will give it a try.
Edit to add - just tried it on 2972 - there is works fine. So the changes to the callback you mention seem to have broken something.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Yep. I got your oxp working ok by changing the new line 153 in OOJSMission.m from
to
<gobbledigook>
However, since at the moment it's a weakRef underlying object ie a hard reference, I don't think it's too wise to just leave it undestroyed.
Ahruman, shall I reinstate the code that was there before 3137 (including the whole win DEP thing, with checks to make sure another world script didn't delete the callbackScript while we're handling the mission screen) ?
Or would you rather look into it yourself?
</gobbledigook>
Code: Select all
DESTROY(callbackScript);
Code: Select all
//DESTROY(callbackScript);
However, since at the moment it's a weakRef underlying object ie a hard reference, I don't think it's too wise to just leave it undestroyed.
Ahruman, shall I reinstate the code that was there before 3137 (including the whole win DEP thing, with checks to make sure another world script didn't delete the callbackScript while we're handling the mission screen) ?
Or would you rather look into it yourself?
</gobbledigook>
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Just run into the same problem again, this time in Eric's update of Military Fiasco (2.5b02). The script itself looks fine (the function is there and seems valid from a glance-over) - would guess it's the same issue I saw above.
Code: Select all
Warning (strict mode): reference to undefined property this.choiceEvaluation
militaryFiasco.js, line 112:
model: "mil-hydra1"}, this.choiceEvaluation);
Warning: Mission.runScreen: expected function instead of 'undefined'.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Yep.
A lot of 1.74-ready oxps are affected by exactly the same bug.
A lot of 1.74-ready oxps are affected by exactly the same bug.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
I assume it is the same bug. I completely replayed Military Fiasco with the new missionscreen before release, so things were correct on release. Before release there were some glitches in Oolites code, but they were all ironed out by Kaks at that time.Thargoid wrote:Just run into the same problem again, this time in Eric's update of Military Fiasco (2.5b02). The script itself looks fine (the function is there and seems valid from a glance-over) - would guess it's the same issue I saw above.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
Excellent, and with perfect timing as I updated my trunk to 3280 only this morning...Ahruman wrote:Fixed in r3289.
So it'll be another swift update tomorrow methinks and some testing.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link