Help. Inputtext fail
#1

Hello everybody.
well my problem is this.
simply does not work, always sends a return even if correct.


I would like the dialog inputText if it were the same as my variable it continues to function.
what's wrong in my script?

Sorry for the english.

pawn Код:
if(dialogid == DIALOG_MANDAREMAIL)
    {
        if(!response) return SendClientMessage(playerid,-1,"Vocк cancelou enviar um texto");
        if(response)
        {
            format(Global,sizeof(Global),inputtext);
            if(Player[playerid][canal] != strval(Global)) return SendClientMessage(playerid,-1,"Error: use um texto valido");
            SendClientMessage(playerid,-1,"funciono");
            return 1;
        }
    }
Reply
#2

Why did you add:
PHP код:
if(!response) return SendClientMessage(playerid,-1,"Vocк cancelou enviar um texto");
        if(
response
One is enought



Try using this as fix
PHP код:
if(dialogid == DIALOG_MANDAREMAIL)
{
    if(
response)
    {
         
format(Global,sizeof(Global),inputtext);
           if(
Player[playerid][canal] != strval(Global)) return SendClientMessage(playerid,-1,"Error: use um texto valido");
         
SendClientMessage(playerid,-1,"funciono");
    }
     else
      {
           
SendClientMessage(playerid,-1,"Vocк cancelou enviar um texto");
    }
    return 
1;

Reply
#3

Quote:
Originally Posted by Squirrel
Посмотреть сообщение
Why did you add:
PHP код:
if(!response) return SendClientMessage(playerid,-1,"Vocк cancelou enviar um texto");
        if(
response
One is enought



Try using this as fix
PHP код:
if(dialogid == DIALOG_MANDAREMAIL)
{
    if(
response)
    {
         
format(Global,sizeof(Global),inputtext);
           if(
Player[playerid][canal] != strval(Global)) return SendClientMessage(playerid,-1,"Error: use um texto valido");
         
SendClientMessage(playerid,-1,"funciono");
    }
     else
      {
           
SendClientMessage(playerid,-1,"Vocк cancelou enviar um texto");
    }
    return 
1;

It did not work.
remained the same.
the problem is not in the response and yes if (Player [playerid] [canal]! = strval (Global)) return SendClientMessage (playerid, -1, "Error: Use a valid text");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)