Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21839

MSAgent Using "Create Object" Error "The callee is not available and disappeared."

$
0
0
Here is my code:

strAgentName = "Merlin"
strAgentPath = "C:\WINDOWS\msagent\chars\" & strAgentName & ".acs"
Set objAgent = CreateObject("Agent.Control.2")
objAgent.Connected = True
objAgent.Characters.Load strAgentName, strAgentPath
Set objCharacter = objAgent.Characters.Character(strAgentName)
objCharacter.Show

objCharacter.play "GetAttention"
objCharacter.speak "Hi I'm Merlin!"
objCharacter.play "LookDown"
objCharacter.Think "Hey..."
objCharacter.MoveTo 500, 400
objCharacter.play "Pleased"
objCharacter.speak "Hello"
objCharacter.play "Pleased"
objCharacter.play "LookDown"
objCharacter.speak "See this is all it does."
objCharacter.Hide

Do While objCharacter.Visible = True

Loop



The program will Show and Hide the Merlin character, but gives the following error on any of the other action requests (play, speak, etc.):

"The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute."


I find it strange that it will load the Merlin character, showing him and hiding him, but errors on any of the other actions. I have not made any references or added any components to my project. The code above is all I have. Any help on this would be much appreciated. Thank you in advance.

Viewing all articles
Browse latest Browse all 21839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>