stock GetAge(Birthday[16])
{
new D,M,Y,Age;
getdate(Y,M,D);
for(new i = strlen(Birthday); i > -1; i--)
{
if(Birthday[i] == '.')
{
new Tmp[32];
for(new o = i-1; o > -1; o--)
{
if(Birthday[o] == '.')
{
strmid(Tmp,Birthday,o+1,i);
if(strval(Tmp)>=M)
{
strmid(Tmp,Birthday,0,o);
if(strval(Tmp)>D)
{
strmid(Tmp,Birthday,i+1,strlen(Birthday));
Age = Y-strval(Tmp)-1;
break;
}
}
strmid(Tmp,Birthday,i+1,strlen(Birthday));
Age = Y-strval(Tmp);
break;
}
}
}
}
return Age;
}
den Rest darfst du dir selber zusammenbauen.