I’m trying to follow the Airport example in the adv3lite tutorial, and I’m having a weird issue where having metalDetector.canTravelerPass() return a falsy value causes a runtime error with the message “wrong number of arguments” no matter what I do.
I can do almost 1:1 the code in the tutorial (minus mild formatting differences):
+metalDetector: Passage 'metal detector; crude; frame'
"The metal detector is little more than a crude metal frame, just large enough to step through, with a power cable trailing across the floor. "
destination = concourse
isOn = true
canTravelerPass(traveler) {
return !isOn || !idCard.isIn(traveler);
}
explainTravelBarrier(traveler) {
"The metal detector buzzes furiously as you pass through it. The security guard beckons you back immediately, with a pointed tap of his holstered pistol. After a brisk search, he discovers the ID card and takes it off you with a disapproving shake of his head. ";
idCard.moveInto(counter);
}
;
Or I can minimize it, so it’s false no matter what and has barely any other code added:
+metalDetector: Passage 'metal detector; crude; frame'
"The metal detector is little more than a crude metal frame, just large enough to step through, with a power cable trailing across the floor. "
destination = concourse
canTravelerPass(traveler) { return nil; }
;
Either way, when I attempt to pass through it in a way that makes it return something falsy (including when I change it so it returns 0 instead of nil) I get this error:
Runtime error: wrong number of arguments
-->adv3Lite/travel.t, line 1815
adv3Lite/travel.t, line 1580
adv3Lite/action.t, line 1458
adv3Lite/action.t, line 1432
adv3Lite/action.t, line 1407
adv3Lite/action.t, line 1276
adv3Lite/action.t, line 109
adv3Lite/action.t, line 1241
adv3Lite/action.t, line 80
adv3Lite/doer.t, line 415
adv3Lite/doer.t, line 384
adv3Lite/command.t, line 548
adv3Lite/command.t, line 503
adv3Lite/command.t, line 243
adv3Lite/remapcmd.t, line 889
adv3Lite/main.t, line 177
adv3Lite/main.t, line 118
adv3Lite/misc.t, line 124
adv3Lite/main.t, line 70
adv3Lite/main.t, line 24
/usr/share/frobtads/tads3/lib/_main.t, line 217
/usr/share/frobtads/tads3/lib/_main.t, line 122
/usr/share/frobtads/tads3/lib/_main.t, line 31
And I get this same error whether I’m running it in FrobTADS, QTads, or Parchment.
I’m honestly at a complete loss here. I’m using adv3lite 2.2.2 if that makes any difference, and I’m writing + compiling from Linux (using the FrobTADS package on the AUR to compile).