Problem with this dialog -
Face9000 - 20.04.2012
Hello,im making a small shop with dialogs,i've this:
pawn Код:
ShowPlayerDialog(playerid, 29, DIALOG_STYLE_LIST, "City Hall", "10 condoms pack to protect from /rape (5000$)\n20 condoms pack (15.000$)\n50 condoms pack (35.000$)\n100 condoms pack (75.000$)\nLife Insurance (When you die you will not pay medical fees)\nSell reputation points (1 point is valued 5000$)\nReset wanted level to 0 (50.000$)\nHealth (5000$)\nArmour (10.000$)\nBuy VIP with ingame money (750.000$)\nCheck your stats (FREE)\nChange your password (FREE)\nTry the luck with winning tickets\n", "OK", "Cancel");
But this errors:
error 075: input line too long (after substitutions)
error 037: invalid string (possibly non-terminated string)
error 017: undefined symbol "OK"
warning 215: expression has no effect
error 001: expected token: ";", but found "-identifier-"
error 017: undefined symbol "Cancel"
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
fatal error 107: too many error messages on one line
It says the dialog text is too long,how i can fix this?
Re: Problem with this dialog -
ivanVU - 20.04.2012
Do it like this
Код:
new string[128],str[128],all[256];
format(string,sizeof(string),"10 condoms pack to protect from /rape (5000$)\n20 condoms pack (15.000$)\n50 condoms pack (35.000$)\n100 condoms pack (75.000$)\nLife Insurance (When you die you will not pay medical fees)\n\nSell reputation points (1 point is valued 5000$)\n");
format(str,sizeof(stri),"Reset wanted level to 0 (50.000$)\nHealth (5000$)\nArmour (10.000$)\nBuy VIP with ingame money (750.000$)\nCheck your stats (FREE)\nChange your password (FREE)\nTry the luck with winning tickets");
format(all,sizeof(all),"%s%s",string,str);
ShowPlayerDialog(playerid, 29, DIALOG_STYLE_LIST, "City Hall",all, "OK", "Cancel");
Re: Problem with this dialog -
RollTi - 20.04.2012
use strcat
Example Below;
pawn Код:
new str[100];
strcat(str, "Thanks players for reading!");
ShowPlayerDialog(playerid, 291, DIALOG_STYLE_MSGBOX, "Thanks", str, "OK", "");
if you want to add new line just do this
pawn Код:
strcat(str, "Test for Scripters\n");
strcat(str, "Last line");
if you want double new line just double the '\n'
Re: Problem with this dialog -
Face9000 - 20.04.2012
Thanks to both but strcat works with listitem?Or it will confuse all?
Re: Problem with this dialog -
RollTi - 20.04.2012
strcat will work in OnDialogResponse
Re: Problem with this dialog -
Face9000 - 20.04.2012
Ok thanks i'll try! Thanks for help.