Jump to content
  • 0

Calling a 'mes' from another NPC using donpcevent,


Question

Posted

Hello everyone,

 

I need help figuring out how to make a message and menu stored in a NPC (lets name it 'Source NPC') show in another NPC (lets name it "Caller NPC").

 

I have already tried this:

 

///////////////////////In "Source NPC":

 

 

OnOferta:

mes "Hey man";
switch (select("message received")){
case 1:
 mes "Nice";
 close;
}
 

 

 

 

///////////////////////////In "Caller NPC":

 

 

mes "'Sup";
switch (select("try to get the message")){
case 1:
 donpcevent Source NPC::OnOferta;
}
 

And when I try to get the message I get the following error:

 

[Error]: script_rid2sd: fatal error ! player not attached!
[Debug]: Function: mes (1 parameter):
[Debug]: Data: string value="Hey man"
[Debug]: Source (NPC): Source NPC at gef_tower (159,54)
 
Can anyone explain me why this is happening, and how could I solve this problem?
 
Thanks in advance. (And sorry for my english. Not my first language.)
 

3 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...