SA-MP Forums Archive
Making 1 string out of more - 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: Making 1 string out of more (/showthread.php?tid=474943)



Making 1 string out of more - Tagathron - 10.11.2013

So i need this song list in a dialog,but i don't want to add song names to 1 giant line so i'm going to make more of lines into 1 string;
pawn Код:
new radioSongs[0] = {"Lana Del Rey - Summertime Sadness\nEminem - Berzerk\nAvicii-Wake me up\nIce Cube- Check Yo Self\nIce Cube-We Be Clubbin\nIce Cube-Just Bounce\nPopping My Collar\nJunior Mafia-Get Money\nFabolous-Gangsta\nAkon-Gangsta\nSnoop Dog ft. Guetta-Sweat\nMetallica-The Unforgiven\nMetallica-Enter Sandman\nBadaBoom-Drop(Mix)"};
new rSongs1[896] = "Lana Del Rey - Summertime Sadness\nEminem - Berzerk\nAvicii-Wake me up";
new rSongs2 = "\nIce Cube- Check Yo Self\nIce Cube-We Be Clubbin\nIce Cube-Just Bounce\nPopping My Collar";
new rSongs3 = "\nJunior Mafia-Get Money\nFabolous-Gangsta\nAkon-Gangsta\nSnoop Dog ft. Guetta-Sweat";
new rSongs4 = "\nMetallica-The Unforgiven\nMetallica-Enter Sandman\nBadaBoom-Drop(Mix)";
strcat(rSongs1, rSongs2, sizeof(rSongs1));
strcat(rSongs1, rSongs3, sizeof(rSongs1));
strcat(rSongs1, rSongs4, sizeof(rSongs1));
But it says "symbol already defined-strcat ?


Re: Making 1 string out of more - SAMProductions - 10.11.2013

They are all represented with rSongs1 (One of them are already has the rSongs1).


Re: Making 1 string out of more - Tagathron - 10.11.2013

Quote:
Originally Posted by SAMProductions
Посмотреть сообщение
They are all represented with rSongs1 (One of them are already has the rSongs1).
They are all represented with rSongs1 ?
I'm putting them into rSongs1.