Opened 7 years ago

Closed 7 years ago

#9712 closed defect (fixed)

IHNM: Error when using the give verb on an actor

Reported by: bgK Owned by: bluegr
Priority: normal Component: Engine: SAGA
Version: Keywords:
Cc: Game: I Have No Mouth


ScummVM: current git master
IHNM: DOS English

Steps to reproduce:

  • Select the "Give" verb
  • Click on an actor in the scene
  • Click again on the same actor without moving the mouse

=> the game errors out with the message "Actor::getObjectScriptEntrypointNumber wrong id 0x0!"

For example, in the attached savegame, try to "Give Edna to Edna".

In DOSBox, it does not appear to be possible to use the "Give" verb on scene actors, but I've not checked if this rule applies in all the cases.

Attachments (2)

Capture d'écran de 2017-03-05 20-06-47.png (129.1 KB ) - added by bgK 7 years ago.
ihnm.s03 (18.2 KB ) - added by bgK 7 years ago.

Download all attachments as: .zip

Change History (4)

by bgK, 7 years ago

Attachment: ihnm.s03 added

comment:1 by eriktorbjorn, 7 years ago

It seems to be because Script::doVerb() tries to use the second object, _pendingObject[1], even though it hasn't been set yet.

_pendingObject[1] is copied from _currentObject[1] in Script::hitObject().

_currentObject[] is set near the end of Script::whichObject(), but only if objectId != _pointerObject. I noticed that when I tried it, there was a difference if I moved the cursor away from the actor before clicking on it a second time. In that case, the verb line was updated properly and the error wasn't triggered.

That's as far as I'll get tonight, at least.

comment:2 by bluegr, 7 years ago

Owner: set to bluegr
Resolution: fixed
Status: newclosed

Thanks for your work! The issue has been fixed in ca8785fdbf

Note: See TracTickets for help on using tickets.