long dialog not working
#1

Код:
strcat(longDialog, "{408080}PERSONAS DATI/PERSONAL INFO{C9C9C9}\n", sizeof(longDialog));
	format(longDialog, sizeof(longDialog), "{408080}Uzvārds/Surname:\n%s\n", tempstr);
	format(longDialog, sizeof(longDialog), "%sVārds/Given name:\n%s\n", name);
	format(longDialog, sizeof(longDialog), "%sIzcelsme/Origin:\n%s\n", PlayerData[playerid][pOrigin]);
	format(longDialog, sizeof(longDialog), "%sDzimљanas datums/Date of birth:\n%s\n", PlayerData[playerid][pBirthdate]);
	format(longDialog, sizeof(longDialog), "%sDzimums/Gender:\n%s\n\n", GetPlayerGender(playerid));
	strcat(longDialog, "%s{408080}PASES DATI/PASSPORT INFO{C9C9C9}\n", sizeof(longDialog));
	format(longDialog, sizeof(longDialog), "%sPases Nr./Passport No.:\n%s\n", PlayerData[playerid][pPassportNr]);
	format(longDialog, sizeof(longDialog), "%sIzdoљanas datums/Date of issue:\n%s\n", PlayerData[playerid][pPassportID]);
	format(longDialog, sizeof(longDialog), "%sDerīga līdz/Date of expiry:\n%s", PlayerData[playerid][pPassportED]);
	format(FullName, sizeof(FullName), "%s pase \"KOPIA\"", GetPlayerNameEx(playerid));
	ShowDialog(playerid, passportAccept, DIALOG_STYLE_MSGBOX, FullName, longDialog, "Apstipr.", "Atcelt");
I don't get any errors, it's just showing only last line
Код:
Derīga līdz/Date of expiry:
and of course string text for date of expiry.
Reply
#2

show me your new longdialog[xx];
make it
Код:
new longDialog[3000];
Reply
#3

Quote:
Originally Posted by SpikY_
Посмотреть сообщение
show me your new longdialog[xx];
make it
Код:
new longDialog[3000];
Still not working.

Old: new longDialog[264]
New: new longDialog[3000]
Reply
#4

You have too much lines ... (too much \n)
Reply
#5

show me the upper part of the dialog.

Quote:
Originally Posted by Mariciuc223
Посмотреть сообщение
You have too much lines ... (too much /n)
There is no concern with it.
Reply
#6

Код:
new longDialog[3000], date[3];
	new name[MAX_PLAYER_NAME], tempstr[MAX_PLAYER_NAME / 2];
	GetPlayerName(playerid, name, sizeof(name));
	new loc = strfind(name, "_", true);
	strmid(tempstr, name, loc, strlen(name));
	strdel(name, loc, strlen(name));
	strdel(tempstr, 0, 1);
	getdate(date[2], date[1], date[0]);

	format(PlayerData[playerid][pPassportNr], 10, "LS%d", random(9999999));
	format(PlayerData[playerid][pPassportID], 24, "%02d/%02d/%d", date[0], date[1], date[2]);
	format(PlayerData[playerid][pPassportED], 24, "%02d/%02d/%d", date[0], date[1], date[2]+2);

	strcat(longDialog, "{408080}PERSONAS DATI/PERSONAL INFO{C9C9C9}\n", sizeof(longDialog));
	format(longDialog, sizeof(longDialog), "{408080}Uzvārds/Surname:\n%s\n", tempstr);
	format(longDialog, sizeof(longDialog), "%sVārds/Given name:\n%s\n", name);
	format(longDialog, sizeof(longDialog), "%sIzcelsme/Origin:\n%s\n", PlayerData[playerid][pOrigin]);
	format(longDialog, sizeof(longDialog), "%sDzimљanas datums/Date of birth:\n%s\n", PlayerData[playerid][pBirthdate]);
	format(longDialog, sizeof(longDialog), "%sDzimums/Gender:\n%s\n\n", GetPlayerGender(playerid));
	strcat(longDialog, "%s{408080}PASES DATI/PASSPORT INFO{C9C9C9}\n", sizeof(longDialog));
	format(longDialog, sizeof(longDialog), "%sPases Nr./Passport No.:\n%s\n", PlayerData[playerid][pPassportNr]);
	format(longDialog, sizeof(longDialog), "%sIzdoљanas datums/Date of issue:\n%s\n", PlayerData[playerid][pPassportID]);
	format(longDialog, sizeof(longDialog), "%sDerīga līdz/Date of expiry:\n%s", PlayerData[playerid][pPassportED]);
	ShowDialog(playerid, passportAccept, DIALOG_STYLE_MSGBOX, "Pase/Passport \"KOPIA\"", longDialog, "Apstipr.", "Atcelt");
Reply
#7

Why are you adding "{408080}PERSONAS DATI/PERSONAL INFO{C9C9C9}\n" to an empty string and then formating that string all over again? First of, format the string so it contains only that text and then just add more text using strcat.
pawn Код:
format(longDialog, sizeof(longiDalog)"{408080}PERSONAS DATI/PERSONAL INFO{C9C9C9}\n");
    strcat(longDialog, "{408080}Uzvārds/Surname:\n%s\n", tempstr, sizeof(longDialog));
    strcat(longDialog, "%sVārds/Given name:\n%s\n", name, sizeof(longDialog));
...
Reply
#8

Try to make it like:
Код:
new String[256];
format(String, sizeof(String), "First Thing\nSecond Thing\n Third Thing\nX Thing");
Reply
#9

Код:
roleplay.pwn(327) : error 035: argument type mismatch (argument 3)
roleplay.pwn(327) : warning 202: number of arguments does not match definition
roleplay.pwn(328) : error 035: argument type mismatch (argument 3)
roleplay.pwn(328) : warning 202: number of arguments does not match definition
roleplay.pwn(329) : warning 202: number of arguments does not match definition
roleplay.pwn(330) : warning 202: number of arguments does not match definition
roleplay.pwn(331) : error 035: argument type mismatch (argument 3)
roleplay.pwn(331) : warning 202: number of arguments does not match definition
roleplay.pwn(333) : warning 202: number of arguments does not match definition
roleplay.pwn(334) : warning 202: number of arguments does not match definition
roleplay.pwn(335) : warning 202: number of arguments does not match definition
Код:
format(longDialog, sizeof(longDialog), "{408080}PERSONAS DATI/PERSONAL INFO{C9C9C9}\n");
	strcat(longDialog, "%s{408080}Uzvārds/Surname:\n%s\n", tempstr, sizeof(longDialog));
	strcat(longDialog, "%sVārds/Given name:\n%s\n", name, sizeof(longDialog));
	strcat(longDialog, "%sIzcelsme/Origin:\n%s\n", PlayerData[playerid][pOrigin], sizeof(longDialog));
	strcat(longDialog, "%sDzimšanas datums/Date of birth:\n%s\n", PlayerData[playerid][pBirthdate], sizeof(longDialog));
	strcat(longDialog, "%sDzimums/Gender:\n%s\n\n", GetPlayerGender(playerid), sizeof(longDialog));
	strcat(longDialog, "%s{408080}PASES DATI/PASSPORT INFO{C9C9C9}\n", sizeof(longDialog));
	strcat(longDialog, "%sPases Nr./Passport No.:\n%s\n", PlayerData[playerid][pPassportNr], sizeof(longDialog));
	strcat(longDialog, "%sIzdošanas datums/Date of issue:\n%s\n", PlayerData[playerid][pPassportID], sizeof(longDialog));
	strcat(longDialog, "%sDerīga līdz/Date of expiry:\n%s", PlayerData[playerid][pPassportED], sizeof(longDialog));
	ShowDialog(playerid, passportAccept, DIALOG_STYLE_MSGBOX, "Pase/Passport \"KOPIA\"", longDialog, "Apstipr.", "Atcelt");
Reply
#10

try like this

Код:
    new string[1000], dialog[3000];
    format(string, sizeof(string),"{408080}PERSONAS DATI/PERSONAL INFO{C9C9C9}\n");
    strcat(dialog,string);
    format(string, sizeof(string),"{408080}Uzvards/Surname:\n%s\n", tempstr);
    strcat(dialog,string);
    format(string, sizeof(string),"%sVards/Given name:\n%s\n", name);
    strcat(dialog,string);
    format(string, sizeof(string),"%sIzcelsme/Origin:\n%s\n", PlayerData[playerid][pOrigin]);
    strcat(dialog,string);
    format(string, sizeof(string),"%sDzimšanas datums/Date of birth:\n%s\n", PlayerData[playerid][pBirthdate]);
    strcat(dialog,string);
    format(string, sizeof(string),"%sDzimums/Gender:\n%s\n\n", GetPlayerGender(playerid));
    strcat(dialog,string);
    format(string, sizeof(string),"%s{408080}PASES DATI/PASSPORT INFO{C9C9C9}\n");
    strcat(dialog,string);
    format(string, sizeof(string),"%sPases Nr./Passport No.:\n%s\n", PlayerData[playerid][pPassportNr]);
    strcat(dialog,string);
    format(string, sizeof(string),"%sIzdošanas datums/Date of issue:\n%s\n", PlayerData[playerid][pPassportID]);
    strcat(dialog,string);
    format(string, sizeof(string),"%s pase \"KOPIA\"", GetPlayerNameEx(playerid));
    strcat(dialog,string);
    format(string, sizeof(string),"{408080}PERSONAS DATI/PERSONAL INFO{C9C9C9}\n");
    strcat(dialog,string);
    ShowPlayerDialog(playerid,passportAccept,DIALOG_STYLE_MSGBOX,FullName,dialog,"Apstipr","Atcelt");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)