Dialog response not Sending Message [Input Dialog]
#5

Quote:
Originally Posted by TzAkS.
View Post
Code:
format(string, sizeof(string), "You selected %s Rooms", room);
return SendClientMessage(playerid, -1, string);
Code:
format(string, sizeof(string), "Please select a value of rooms between 1 and %s", MAX_ROOMS);
SendClientMessage(playerid, -1, string);
Hmm.. okay i tried this and it worked... but the string isn't printing correctly as an example...
I typed "6" and it showed


Then i typed "666" and it showed


Quote:
Originally Posted by Jonny5
View Post
just guessing here
pawn Code:
if(room < 1 || room > MAX_ROOMS) return format(string, sizeof(string), "You selected %s Rooms", room);
to
pawn Code:
if(room > 1 || room < MAX_ROOMS) return format(string, sizeof(string), "You selected %s Rooms", room);

edit:

and yes your not useing SendClientMessage like stated above.
Ahh cheers for your help but it's kind of not what i am after :P

Quote:
Originally Posted by iggy1
View Post
Make sure your scripts all return zero at the end of "OnDialogResponse". If for example your GM returns 1 at the end of the callback, your dialogs in your filterscripts wont execute correct.

In the new.pwn that comes with the server, OnDialogResponse should really look like this.

pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    return 0;
}
It's OK to return other values if the dialog is found. Because all dialogids should be unique.
EG,
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 0)
    {
        return 1;
    }

    return 0;
}
Not sure f this is your problem but it's a very common mistake. What usually happens is, when you respond to the dialog it closes the dialog and nothing else.
Yea, thanks for your help, but i am not using it as a filter script, but I will keep it in mind, Cheers

So basically it is not printing correctly
I type '6' and it shows


I type '666' and it shows
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)