SA-MP Forums Archive
Dialog problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog problem (/showthread.php?tid=336177)



Dialog problem - Visio - 21.04.2012

i want to make this
Код:
{
	        	             new year, month,day;
			getdate(year, month, day);
	        	              new DateInfo[3][20];
			split(text, DateInfo, '/');
			if(year - strvalEx(DateInfo[2]) > 100 || strvalEx(DateInfo[2]) < 1 || strvalEx(DateInfo[2]) >= year)
			{
			    SendClientMessage(playerid, COLOR_1BLUE, "Care este data ta de nastere? [ zi/luna/an ]");
			    return 0;
			}
			new check = year - strvalEx(DateInfo[2]);
			if(check == year)
			{
			    SendClientMessage(playerid, COLOR_1BLUE, "Care este data ta de nastere? [ zi/luna/an ]");
			    return 0;
			}
			if(strvalEx(DateInfo[1]) > month)
			{
			    check -= 1;
			}
			else if(strvalEx(DateInfo[1]) == month && strvalEx(DateInfo[0]) > day)
			{
			    check -= 1;
			}
			PlayerInfo[playerid][pAge] = check;
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "Deci %s, ai %d ani.", sendername, PlayerInfo[playerid][pAge]);
			SendClientMessage(playerid, COLOR_WHITE, string);
			RegistrationStep[playerid] = 3;//asta cautam
      			SendClientMessage(playerid, COLOR_1BLUE, "Unde vrei sa fi spawnat? LS(Los Santos) sau SF (San Fiero)");
      			//SendClientMessage(playerid, COLOR_GREEN, "[Info]: Ok, acum iti vom prezenta un tutorial, iar daca vrei sa sari peste el scrie '/skip'.");
			return 0;
	    }
in a dialog but i recived 1 error at split(text, DateInfo, '/');
please help me


Re: Dialog problem - Visio - 21.04.2012

bump


Re: Dialog problem - Ainseri - 21.04.2012

If you want help, make it easy for us to help you. Post the error you get and sort out your indentation and tell us what you want to make instead of just posting code that we already both know doesn't work.


Re: Dialog problem - Visio - 21.04.2012

i want to make that script in a dialog
that script now is for typeing in chat the answer,but
in chat you need to type dd/mm/yyyy and i want do to that in a dialog like that



Re: Dialog problem - Ainseri - 21.04.2012

What error do you receive!?


Re: Dialog problem - Visio - 21.04.2012

i recived 1 error at split(text, DateInfo, '/');
undefinited symbol text


Re: Dialog problem - Ainseri - 21.04.2012

It's inputtext, not just text. Try that.


Re: Dialog problem - Visio - 21.04.2012

ok i will try,i will come back with edit
i love you,work perfectly!


Re: Dialog problem - Ainseri - 21.04.2012

Quote:
Originally Posted by Visio
Посмотреть сообщение
ok i will try,i will come back with edit
i love you,work perfectly!
Hah, no problem. Good luck with the rest of your script.


Re: Dialog problem - Visio - 21.04.2012

thx,sorry for my bad english an good luck too!