OnDialogResponse problem
#1

I have return in the end?

Error i get
Код:
C:\Users\Nathan\Desktop\PGRP\gamemodes\penls.pwn(1810) : warning 209: function "OnDialogResponse" should return a value
pawn Код:
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new string[128];
    if(dialogid == 1)
    {
        if(response)
        {
            if (GetPVarInt(playerid, "PlayerAccount") != 0)
            //if (gPlayerAccount[playerid] != 0)
            {
                ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT,"Welcome, Please Log-In","Type your password below to log-in","Log-in","Quit");
            }
            else
            {
                ShowPlayerDialog(playerid, 3, DIALOG_STYLE_INPUT,"Welcome, Please Register","Type your password below to register a new account.","Register","Quit");
            }
            new y, m, d;
            new h,mi,s;
            getdate(y,m,d);
            gettime(h,mi,s);
            format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has accepted the terms and conditions.",d,m,y,h,mi,s,sendername);
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY,"* You selected \"Refuse\", To play you must agree to the terms of condition");
            Kick(playerid);
        }
        if(dialogid == 2)
        {
            if(response)
            {
                strmid(Typed[playerid], inputtext, 0, strlen(inputtext), 255);
                if(!strcmp(Typed[playerid], "None", true))
                {
                    ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT,"Try Again, Please Log-In","You didn't typed a password!\nType your password below to log-in","Log-in","Quit");
                }
                else
                {
                    OnPlayerLogin(playerid, inputtext);
                }
            }
            else
            {
                Kick(playerid);
            }
        }
        if(dialogid == 3)
        {
            if(response == 1)
            {
                if(strlen(inputtext) < 3)

                    ShowPlayerDialog(playerid, 3, DIALOG_STYLE_INPUT,"Try Again, Please Register","The password entered is Too Short!\nType your password below to register a new account.","Register","Quit");
                    return 1;
                }
                if(strlen(inputtext) > 20)
                {
                    ShowPlayerDialog(playerid, 3, DIALOG_STYLE_INPUT,"Try Again, Please Register","The password entered is too Long!\nType your password below to register a new account.","Register","Quit");
                    return 1;
                }
                OnPlayerRegister(playerid, inputtext);
            }
            else
            {
                Kick(playerid);
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
OnDialogResponse problem - by N0FeaR - 15.03.2013, 20:07
Re: OnDialogResponse problem - by davve95 - 15.03.2013, 20:11
Re: OnDialogResponse problem - by N0FeaR - 15.03.2013, 20:17

Forum Jump:


Users browsing this thread: 1 Guest(s)