Combining two strings together
#1

G'day,
I am aware you can use strcat to combine two strings into one.
however I am not 100% sure It's what I want haha.

I would like
pawn Код:
//
                    format(string3, sizeof(string3),"%s", string1);
                    format(string3, sizeof(string3)," with %s.", string2);
                    ShowPlayerDialog(playerid, 169, DIALOG_STYLE_MSGBOX, "Joint Strings", string3, "Finalise","Back");
would it be something like.
pawn Код:
//
                    format(string1, sizeof(string3),"%s", string1);
                    format(string2, sizeof(string3)," with %s.", string2);
                    strcat(string1, string2, sizeof(string1));
                    ShowPlayerDialog(playerid, 169, DIALOG_STYLE_MSGBOX, "Joint Strings", string1, "Finalise","Back");
Reply
#2

I don't actually fully understand.
But if you don't want strcat you could do something like:
Код:
format(string1, sizeof(string3), "%s with %s", string1, string2);
Not sure if I understand you, though.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)