Problem with this dialog
#1

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?
Reply
#2

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");
Reply
#3

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'
Reply
#4

Thanks to both but strcat works with listitem?Or it will confuse all?
Reply
#5

strcat will work in OnDialogResponse
Reply
#6

Ok thanks i'll try! Thanks for help.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)