|
-
Nov 11th, 2000, 11:49 PM
#1
Thread Starter
Member
Somebody please tell me how to combine these 2 sets of strings together!!!
Code:
Bsp0 = Val(List2.List(0))
Bsp0 = Bsp0 + 1
List2.List(0) = Str$(Bsp0)
-----------------------------------------
Dim j%
For j = 1 to List1.ListCount - 1
a.WriteLine List1.List(j)
Next
I need it so a.WriteLines are generated as many times as the List2.ListCount indicates. I most also keep this pinned on somewhere after the filename. I'm not really sure how this would all go together, that's why I'm here!!!!
Code:
(Left$(Bsp0, Len(Bsp0) - 4))
ANYTHING WOULD BE GOOD!!!!
If at first you DO succeed, don't look too astonished!
-deadBird
=================
-
Nov 11th, 2000, 11:59 PM
#2
Frenzied Member
Can you clarify exactly which two strings you wish to combine please? I'm trying to figure out exactly what it is you want.
Harry.
"From one thing, know ten thousand things."
-
Nov 12th, 2000, 12:11 AM
#3
Thread Starter
Member
Ok, I have a FileListBox, a ListBox. The FileListBox is adding filenames, that are selected, into the ListBox which then goes into a file called "doomanf.cfg". I have to get rid of the file extension with this: (Left$(bsp0, Len(bsp0) - 4)). I need to increment a counter so that:
Bsp0 = (List2.List(0)
Bsp1 = (List2.List(1)
Bsp2 = (List2.List(2)
I don't know how to get the mixture of Bsp(string) and 0(integer) to work together in a single line of. I want the user to be able to select as many or as little filenames as they want. I guess that makes this a dynamic array. Here's the code I've been medaling with!
Code:
Public Sub Command1_Click()
Dim GameType%
Dim Bsp$
'Bsp0 = (List2.List(0))
' Bsp0 = Bsp0 + 1
' List2.List(0) = Str$(Bsp0)
ChDir (Spl1.Dir1.Path) & ("\baseq3")
GameType = List1.ListIndex
MsgBox "writing to doomanf.cfg"
Set fso = CreateObject("Scripting.FileSystemObject")
Set a = fso.CreateTextFile("doomanf.cfg")
a.WriteLine ("")
a.WriteLine ("//This config file cycles through all the maps in the game. FFA mode.")
a.WriteLine ("")
a.WriteLine ("set g_gametype ") & (GameType)
a.WriteLine ("")
'NewLine =
'NewLine =
' a.WriteLine ("set m1 ""fraglimit 10" & " ; map ") & (Left$(Bsp0, Len(Bsp0) - 4))
a.WriteLine ("set m2 ""fraglimit 10" & " ; map ") & (Left$(I, Len(I) - 4))
'a.WriteLine ("set m3 ""fraglimit 10" & " ; map ") & (Left$(bsp2, Len(bsp2) - 4))
'a.WriteLine ("set m4 ""fraglimit 10" & " ; map ") & (Left$(bsp3, Len(bsp3) - 4))
a.Close
MsgBox "doomanf.cfg written successfully!!!"
ChDir (Spl1.Dir1.Path)
'Shell ("quake3.exe ") & (Dedicated) & (" +exec doomanf.cfg")
End Sub
If at first you DO succeed, don't look too astonished!
-deadBird
=================
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|