SA-MP Forums Archive
PM error dialog - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: PM error dialog (/showthread.php?tid=520375)



PM error dialog - kosa451 - 18.06.2014

HEy i get this error while making a Dialog PM System.



How do make that it sends to another player? and a note that shows that they've gotten a PM.

ERROR:
Код:
C:\Users\Linus\Desktop\samptesting\gamemodes\PM.pwn(278) : error 017: undefined symbol "SendPlayerMessage"
C:\Users\Linus\Desktop\samptesting\gamemodes\PM.pwn(286) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  switch(dialogid)//if your using only one dialog this isn't needed but you never know.
        {
        case 3:
            {
                 if(strlen(inputtext) > 0)
                 {
line 278:                     SendPlayerMessage(playerid, inputtext);
                 }
                 else
                 {
                     SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
                 }
            }
    }
    return 1;
}

COMMAND:

pawn Код:
CMD:pm(playerid, params[])
{
   ShowPlayerDialog(playerid, 3, DIALOG_STYLE_INPUT, "Private Message", "Type your PM here.", "Submit", "Cancel");
   return 1;
}



Re: PM error dialog - diego200052 - 18.06.2014

Try This:

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  switch(dialogid)//if your using only one dialog this isn't needed but you never know.
        {
        case 3:
            {
                 if(strlen(inputtext) > 0)
                 {
                     SendClientMessage(playerid,0xFFFFFFAA,inputtext);
                 }
                 else
                 {
                     SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
                 }
            }
    }
    return 1;
}



Re: PM error dialog - Guest4390857394857 - 18.06.2014

What's the stock your using for SendPLAYERMESSAGE?


Re: PM error dialog - Golf - 18.06.2014

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
  switch(
dialogid)//if your using only one dialog this isn't needed but you never know.
        
{
        case 
3:
            {
                 if(
strlen(inputtext) > 0)
                 {
                     
SendClientMessage(playerid,0xFFFFFFAA,inputtext);
                 }
                 else
                 {
                     
SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
                 }
            }
    }
    return 
1;




Re: PM error dialog - Cutt3r - 18.06.2014

Just change SendPlayerMessage to SendClientMessage, else you need to define SendPlayerMessage.