Hi! I’ve got a problem that it seems a lot of people here have, but none of those threads help.
My game so far is basic - Four roads meeting to one point, a guy called Michael in that point. He’s supposed to ask you something that you have to reply yes or no to. I get a nil object reference
error with a yellow arrow pointing to the line inConvState.handleConversation(otherActor, topic, convType);
in the actor.t
file.
The comment above it said that “it wasn’t a greeting”. I tried to figure it out by saying “> hello” as a command. It returned the same error but with the yellow arrow at curState.suggestTopicsFor(actor, explicit);
. I’m stuck. What am I doing wrong?
This is Michael’s code, by the way.
Michael: Person 'tall young man*men/guy/friend/person*people' 'Michael'
location = tIntersectionMiddle
desc = "He's your friend."
isHim = true
isProperName = true
;
+ blackTShirt: Wearable 'black tshirt/t-shirt/shirt' 'black t-shirt'
"It's just a black t-shirt."
isWornBy = Michael
;
+ blueJeans: Wearable 'blue denim jeans/trousers/pants' 'jeans'
"It's a bit worse for wear but he's fine with it."
isWornBy = Michael
;
+ michaelWaiting: ConversationReadyState
isInitState = true
afterTravel(traveller, connector) {
inherited(traveller, connector);
if (traveller == me) {
"Michael turns to face you. \b <q>Did you get it?</q> he whispers to you.";
Michael.initiateConversation(nil, 'got-it');
}
}
;
+ ConvNode 'got-it'
;
++ YesTopic, SuggestedYesTopic
"You nod. <q>Of course.</q> you say. \b You see a glint in Michael's eye. <q>Okay. Follow me.</q>"
;
++ NoTopic, StopEventList
[
'<q>Nope. I didn\'t.</q> you tell him. \b Michael frowns. <q>No, I\'m pretty sure you got it.<q>',
'<q>No, seriously, I don\'t have it.</q> Now Michael\'s annoyed. <q>Look, I know you have it, alright? I just need you to confirm.</q>',
'You don\'t want to lie anymore. You actually do have it in your bag.'
]
;
Not sure if you’ll need the stack, but here it is anyway.
Michael.suggestTopicsFor(me, nil) + 0xF
conversationManager.showOrScheduleTopicInventory(Michael, me) + 0x3A
michaelWaiting.handleConversation(me, helloTopicObj, helloConvType) + 0x26
me.sayToActor(Michael, helloTopicObj, helloConvType) + 0x53
me.sayHello(me) + 0x19
HelloAction [3687].execAction() + 0x1D
Action [3687].doActionOnce() + 0xB5
IAction [3687].doActionMain() + 0xD
Action [3687].doAction(me, me, nil, nil) + 0x7A
executeAction(me, nil, me, nil, obj#3687 (predicate(Hello))) + 0x10A
func#2c9b5() + 0x30
withCommandTranscript(CommandTranscript, obj#367e (AnonFuncPtr)) + 0x25
executeCommand(me, me, [['hello',tokWord,'hello']], true) + 0x2C2
PendingCommandToks [3691].executePending(me) + 0x1D
me.executeActorTurn() + 0xD4
func#260c4() + 0x17
senseContext.withSenseContext(nil, sight, obj#3942 (AnonFuncPtr)) + 0x1D
callWithSenseContext(nil, sight, obj#3942 (AnonFuncPtr)) + 0x15
func#26105() + 0x3F
withCommandTranscript(CommandTranscript, obj#3947 (AnonFuncPtr)) + 0x49
withActionEnv(EventAction, me, obj#3947 (AnonFuncPtr)) + 0x3C
me.executeTurn() + 0x30
runScheduler() + 0xB6
runGame(true) + 0x2C
gameMain.newGame() + 0x1B
mainCommon(&newGame) + 0x4D
main(['debug\\A Thief\'s Night.t3']) + 0x1B
flexcall(main, ['debug\\A Thief\'s Night.t3']) + 0x59
_mainCommon(['debug\\A Thief\'s Night.t3'], nil) + 0x53
_main(['debug\\A Thief\'s Night.t3']) + 0x12