Problem: Dodajem dialog za godine, ali mi ispisuje Error: Undefined symbol "text", a taj red je split(text
Code:
if(dialogid == 4)
{
if(RegistrationStep == 2)
{
if(response)
{
new year, month,day;
getdate(year, month, day);
new DateInfo;
split(text, DateInfo, '/');
if(year - strvalEx(DateInfo) > 100 || strvalEx(DateInfo) < 1 || strvalEx(DateInfo) >= year)
{
ClearChatbox(playerid, 8);
ShowPlayerDialog(playerid,1551,DIALOG_STYLE_INPUT,"Koji je datum vaseg rodjenja?","Upisite tacan datum rodjenja (koristite dan/mesec/godina)\nPrimer:10/06/1996","U redu","");
return 0;
}
new check = year - strvalEx(DateInfo);
if(check == year)
{
ClearChatbox(playerid, 8);
ShowPlayerDialog(playerid,1551,DIALOG_STYLE_INPUT,"Koji je datum vaseg rodjenja?","Upisite tacan datum rodjenja (koristite dan/mesec/godina)\nPrimer:10/06/1996","U redu","");
return 0;
}
if(strvalEx(DateInfo) > month)
{
check -= 1;
}
else if(strvalEx(DateInfo) == month && strval(DateInfo) > day)
{
check -= 1;
}
PlayerInfo = check;
SendClientMessage(playerid, COLOR_YELLOW, "______________________________");
format(string, sizeof(string), "Ok, dakle vi imate %d godina.",PlayerInfo);
SendClientMessage(playerid, COLOR_YELLOW2, string);
SendClientMessage(playerid, COLOR_YELLOW, "______________________________");
RegistrationStep = 3;
TextDrawShowForPlayer(playerid, TextdrawREG);
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Odakle ste?", "Srbija \nCrna Gora \nHrvatska \nMakedonija \nBosna i Hercegovina \nSlovenija", "U redu", "");
return 0;
}
}
return 1;
}EDIT: Reseno, samo sam trebao inputtext a ne text.
