Being kicked from my own server?
#1

This has just started to happen recently for seemingly no reason. What happens is I connect to the server and the register dialog appears. I type in a password and click "register" and it registers my account and saves it in the MySQL database, but then instantly says "Server closed the connection". It's the same if I log in too. My dialogs' buttons are the correct way around according to the OnDialogResponse page on the SA-MP Wiki:
Quote:

response - 1 for left button and 0 for right button (if only one button shown, always 1)

My dialogs
Quote:

ShowPlayerDialog(playerid, D_REG, DIALOG_STYLE_PASSWORD, "{00D3FF}Register your account", string, "Register", "Quit");

ShowPlayerDialog(playerid, D_LOGIN, DIALOG_STYLE_PASSWORD, "{00D3FF}Login to your account", string, "Login", "Quit");

Reply
#2

Can you show us your OnDialogResponse?
Reply
#3

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case D_REG:
        {
            new string[128];
            if(response == 0)
            {
                Kick(playerid);
            }
            else
            { // password length checks and valid character check
I don't want to paste the whole thing because it's a large chunk of script, but you can clearly see the response is written correctly. And like I said, it was working fine before and I haven't changed this part of the script since it stopped working.
Reply
#4

Not sure what else it could be.

You could try this:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case D_REG:
        {
            new string[128];
            if(response == 0)
            {
                print("Kicking player");
                Kick(playerid);
            }
And than test it, than you could find out the origin of the problem.
If it gets printed its here if not its somewere else.
Reply
#5

Quote:
Originally Posted by Facerafter
Посмотреть сообщение
Not sure what else it could be.

You could try this:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case D_REG:
        {
            new string[128];
            if(response == 0)
            {
                print("Kicking player");
                Kick(playerid);
            }
And than test it, than you could find out the origin of the problem.
If it gets printed its here if not its somewere else.
I did that and the print message didn't show. I also commented out every single instance of the Kick(playerid); function in my script and it still closes the connection. Really weird.
Reply
#6

Show your register dialog for us to have a better look into the script..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)