Unknown command O.o
#1

Hey,
Can somebody explain me what am i doing wrong here?
I think that i do something wrong in strcat!ћ


Код:
new string1[600], string2[600], string3[600], string4[600], string5[600], string6[600], string7[600], komande[1500];
strcat(string1, "string1 \n");
strcat(string2, "aa \n");
strcat(string3, "b \n");
strcat(string4, "c \n");
strcat(string5, "d\n");
strcat(string6, "e\n\n");
strcat(string7, "f.");
format(komande, sizeof(komande), "%s%s%s%s%s%s%s", string1, string2, string3, string4, string5, string6, string7);
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "My Dialog", komande, "Close", "");
Reply
#2

You must format all the strings, then use strcat.
Reply
#3

Can you gimme some example cuz i dont get it :S?
Reply
#4

Oh God, I hope you don't intend to do this like that. 600 cells per string? Your heap is crying!
Reply
#5

I have really big text :S
Can somebody gimme example how to do it in dialog? thanks

EDIT: Too much strcat so i changed that..
Lock
Reply
#6

Quote:
Originally Posted by SeYziicH
Посмотреть сообщение
I have really big text :S
Can somebody gimme example how to do it in dialog? thanks
It's the worst thing I've ever seen. 4200 cells for these string when you can do it like that:

pawn Код:
new
    string1[ 1024 ]
;

strcat(string1, "blablabla.. \n");
strcat(string1, "blablabla.. \n");
strcat(string1, "blablabla.. \n");
strcat(string1, "blablabla.. \n");
strcat(string1, "blablabla.. \n");
strcat(string1, "blablabla.. \n");
strcat(string1, "blablabla.. \n");

ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "My Dialog", string1, "Close", "");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)