SA-MP Forums Archive
Unknown command O.o - 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: Unknown command O.o (/showthread.php?tid=423551)



Unknown command O.o - SeYziicH - 18.03.2013

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", "");



Re: Unknown command O.o - DiGiTaL_AnGeL - 18.03.2013

You must format all the strings, then use strcat.


Re: Unknown command O.o - SeYziicH - 18.03.2013

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


Re: Unknown command O.o - Misiur - 18.03.2013

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


Re: Unknown command O.o - SeYziicH - 18.03.2013

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


Re: Unknown command O.o - Konstantinos - 18.03.2013

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", "");