Hey,
hab schon in einigen Tut´s hier gestöbert bloß bin ich nicht wirklich schlau draus geworden wie ich denn jetzt diese Geburtsdatumsabfrage mache !
Bekomme immer diese Error´s:
Hier der bisherige Code:
Code
forward split(const strsrc[], strdest[][], delimiter);
if(dialogid == DIALOG_ALTER)
{
new year, month,day;
getdate(year, month, day);
new DateInfo[3][20];
split(inputtext, DateInfo, '.');
if(response == 1)
if (strlen(inputtext) > 10) {
ShowPlayerDialog(playerid,DIALOG_ALTER,DIALOG_STYLE_INPUT,"Geburtsdatum","Das ist kein Geburtsdatum !","Weiter","");
return 0;
}
if (!IsValidDate(strval(DateInfo[0]),strval(DateInfo[1]),strval(DateInfo[2]))) {
ShowPlayerDialog(playerid,DIALOG_ALTER,DIALOG_STYLE_INPUT,"Geburtsdatum","Das ist kein Geburtsdatum !","Weiter","");
return 0;
}
if(year - strval(DateInfo[2]) > 100 || strval(DateInfo[2]) < 1 || strval(DateInfo[2]) >= year)
{
ShowPlayerDialog(playerid,DIALOG_ALTER,DIALOG_STYLE_INPUT,"Geburtsdatum","Das ist kein Geburtsdatum !","Weiter","");
}
new check = year - strval(DateInfo[2]);
if(check == year)
{
ShowPlayerDialog(playerid,DIALOG_ALTER,DIALOG_STYLE_INPUT,"Geburtsdatum","Das ist kein Geburtsdatum !","Weiter","");
return 0;
}
if(strval(DateInfo[1]) > month)
{
check -= 1;
}
else if(strval(DateInfo[1]) == month && strval(DateInfo[0]) > day)
{
check -= 1;
}
new string[256];
PlayerInfo[playerid][pAge] = check;
format(string, sizeof(string), "OK, du bist %d Jahre alt!",PlayerInfo[playerid][pAge]);
RegistrationStep[playerid] = 3;
ShowPlayerDialog(playerid,DIALOG_HERKUNFT,DIALOG_STYLE_LIST,"Woher kommst du?","Deutschland\n?sterreich\nSchweiz","Weiter"," ");
if(response == 0){
ShowPlayerDialog(playerid,DIALOG_ALTER,DIALOG_STYLE_INPUT,"Geburtsdatum"," Wie lautet deinGeburtsdatum ?","Weiter"," ");
}
return 1;
}
return 1;
Alles anzeigen
Danke, wenn ihr mir helfen könntet !