Dialog response help
#5

Код:
	if(dialogid == 959)
	{
		if(response)
		{
		if(!strlen(inputtext)) //If they didn't enter any password
            {// then we will tell to them to enter the password to register
			    ShowPlayerDialog(playerid, 959, DIALOG_STYLE_INPUT, "What is your Age? (16-80)", "Insert your age", "OK", "");
                return 1;
            }
			new age = strvalEx(text);
			if(age < 16 || age > 80)
			{
			    SendClientMessage(playerid, COLOR_NICEBLUE, "What is your Age? (16-80)");
			    return 0;
			}
			PlayerInfo[playerid][pAge] = age;
			format(string, sizeof(string), "Ok, so you are %d year old.",PlayerInfo[playerid][pAge]);
			SendClientMessage(playerid, COLOR_YELLOW2, string);
			RegistrationStep[playerid] = 3;
			SendClientMessage(playerid, COLOR_NICEBLUE, "What is your Origin? (Type in: USA, Europe, Asia or Africa)");
		}
		else{}
		return 1;
	}
now i added if he doesn't write age the dialog will popup again.
now it says after compiling no symbol "text"
but before the dialogrespone the "text" exist. here
Код:
		else if(RegistrationStep[playerid] == 2)
	    {
			 new age = strvalEx(text);
			if(age < 16 || age > 80)
			{
			    SendClientMessage(playerid, COLOR_NICEBLUE, "What is your Age? (16-80)");
			    return 0;
			}
			PlayerInfo[playerid][pAge] = age;
			format(string, sizeof(string), "Ok, so you are %d year old.",PlayerInfo[playerid][pAge]);
			SendClientMessage(playerid, COLOR_YELLOW2, string);
			RegistrationStep[playerid] = 3;
			SendClientMessage(playerid, COLOR_NICEBLUE, "What is your Origin? (Type in: USA, Europe, Asia or Africa)");
			return 0;
	    }
Reply


Messages In This Thread
Dialog response help - by PaulDinam - 23.06.2012, 21:03
Re: Dialog response help - by Kindred - 23.06.2012, 21:05
Re: Dialog response help - by PaulDinam - 23.06.2012, 21:10
Re: Dialog response help - by Kindred - 23.06.2012, 21:12
Re: Dialog response help - by PaulDinam - 23.06.2012, 21:21
Re: Dialog response help - by Kindred - 23.06.2012, 21:24
Re: Dialog response help - by PaulDinam - 23.06.2012, 21:31

Forum Jump:


Users browsing this thread: 2 Guest(s)