Raised This Month: $ Target: $400
 0% 

Moving a String into a array


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 10-11-2004 , 00:34   Moving a String into a array
Reply With Quote #1

Code:
new MyString[84] = "de_dust de_aztec de_nuke de_inferno"

Now, i need a way to split this string up into this array
Code:
new MyArray[20][20]
But the problem, is that MyString will not allways contain the same ammunt of words, So i need a way thats more "dynamic".

I tried doing:
Code:
    for(new i=1;i<=g_NumberOfMaps;i++)          parse(MyString,MyArray[i],23)
But then it only copies the first Text ( in this case de_dust) over and over. So if someone can think of a nice and clean way of this it would save me a head ake.
EKS is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode