Concatenation of strings (putting two strings together)?
Howdy all,
I'm sure this is a no brainer, but I'm stumped: I'm looping through a folder of maps. As each map is verified to be a legit map, I want to add it to a string in the following format (it's SQL if you're curious): Code:
[some sql code will be here starting the string off, but it's not relevant]So where I stand right now is that I have the name of the map in a variable, and I can use the format function to put that name into the format of ('map_name', 'extra_value1', 'extra_value2') Now, how do I add them to the existing list so they become one long string of value sets like that, with each separated by a comma (the last one shouldn't have a comma after it)? Thank you!!! |
Re: Concatenation of strings (putting two strings together)?
Code:
new string[2001], iLen;Code:
new list[2001], iLen; |
Re: Concatenation of strings (putting two strings together)?
Hey, that's just what I wanted!
My only problem: I'm not sure what the length of the whole string might be after each data set has been added, since there's no limit to how many maps a server might have. Is there a way to make it open ended, or should I just set it to a really large number? Thanks for getting back to me so quickly! |
Re: Concatenation of strings (putting two strings together)?
Could either use a large array, or you could use cellarray. I don't have much experience with it, and I don't think there is a tutorial on it, so you would have to look at other plugins that use it.
|
Re: Concatenation of strings (putting two strings together)?
Large array it is. :P
Hehe... I'm not lazy, I'm just really not sure what I'd be looking for. I can always upgrade it later when I learn more.. I'll look into it when I'm a little more experienced. Thanks for your help! :) |
| All times are GMT -4. The time now is 02:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.