Putting 2 strings into one
#1

Ok, I have this dialog which displays all commands for a admin rank. Well because there are so many commands for that rank the string is big and it wont fit on one lines (5 errors of input line to long etc) so i tried strcat to combine them, it didnt work then i tried inserting the string into the other and that didnt work.
Any solutions ?

pawn Код:
new Mega_String[2][400];
                    format(Mega_String[0], 400, "{FF0000}[CMD]{FFFFFF} /slap -{FF0000} Slaps a player into the air and reduces some health\n{FF0000}[CMD]{FFFFFF} /apm -{FF0000} Send an admin privite message to a player \
                    \n{FFFFFF} /mute -{FF0000} Mutes a player\n{FF0000}[CMD]{FFFFFF} /unmute -{FF0000} UnMutes a player\n{FFFFFF} /ann -{FF0000} Announces a message on the screen\n{FFFFFF} /disarm -{FF0000} Disarms a player"
);
                    format(Mega_String[1], 400, "\n{FFFFFF} /freeze -{FF0000} Freezes a player\n{FFFFFF} /unfreeze -{FF0000} Unfreezes a player\
                    \n{FFFFFF} /goto -{FF0000} Teleports yourself to the given player\n{FFFFFF} /bring -{FF0000} Bring a player to your position"
);
                    strins(Mega_String[0], Mega_String[1], 0);
Reply
#2

Use strcat

pawn Код:
new epicString[1000];
strcat(epicString, "Commands...\n");
strcat(epicString, "Other stuff...");
Reply
#3

Quote:
Originally Posted by thefatshizms
Посмотреть сообщение
pawn Код:
new Mega_String[2][400];
Quote:
Originally Posted by OxyG3N
Посмотреть сообщение
pawn Код:
new epicString[1000];
really? you kiddin me? Mega_String? epicString? lolz xD and ye use strcat
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)