08.08.2011, 18:09
(
Последний раз редактировалось xXGaryXx; 09.08.2011 в 15:30.
)
Okay now all in one:
I tried to change a birthday question ( for registration ) to the dialog style. I hadn't any ideas how to do this but finaly i tried it and there was just 1 error: "'text' is not defined"
My question is how to define 'text'. I cannot find the #define or new part of text :O
I tried to change a birthday question ( for registration ) to the dialog style. I hadn't any ideas how to do this but finaly i tried it and there was just 1 error: "'text' is not defined"
pawn Код:
if(dialogid == BIRTHDAY)
{
if(strlen(inputtext))
{
new year, month,day;
getdate(year, month, day);
new DateInfo[3][20];
split(text, DateInfo, '.'); //<--- Here is the error (( text is not defined )) but how to define it??
if(year - strvalEx(DateInfo[2]) > 100 || strvalEx(DateInfo[2]) < 1 || strvalEx(DateInfo[2]) >= year)
{
ShowPlayerDialog(playerid,BIRTHDAY,DIALOG_STYLE_INPUT,"Error","When is your Birthday? ( DD.MM.YYYY )","Enter","Cancel");
return 0;
}
new check = year - strvalEx(DateInfo[2]);
if(check == year)
{
ShowPlayerDialog(playerid,BIRTHDAY,DIALOG_STYLE_INPUT,"Error","When is your Birthday? ( DD.MM.YYYY )","Enter","Cancel");
return 0;
}
if(strvalEx(DateInfo[1]) > month)
{
check -= 1;
}
else if(strvalEx(DateInfo[1]) == month && strval(DateInfo[0]) > day)
{
check -= 1;
}
PlayerInfo[playerid][pAge] = check;
ClearChatbox(playerid, 8);
RegistrationStep[playerid] = 3;
ShowPlayerDialog(playerid, ORTSMENU, DIALOG_STYLE_LIST, "Okay. Where are you from?","Los Santos\nSan Fierro\nLas Venturas\nLiberty City", "Choose", "Cancel");
return 0;
}
}