Results 1 to 2 of 2

Thread: HELP!!! i can't mix these #!@%$ strings!

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2000
    Location
    Mentor,Oh,US
    Posts
    33

    Unhappy

    Code:
    Public Sub Command1_Click()
      Dim GameType As Integer
    Bsp0 = Val(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 ("")
     a.WriteLine ("set m1 ""fraglimit 10" & " ; map ") & (Left$(Bsp0, Len(Bsp0) - 4))
     a.WriteLine ("set m2 ""fraglimit 10" & " ; map ") & (Left$(bsp1, Len(bsp1) - 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
    When I execute this code it gives me a, "invalid call or procedure," error. Bsp0 is a filename added from a File2 to a List2. I need everything in the List2 (the selected files) to be assigned to Bsp0, Bsp1, and so on. In addition to this, I must remove the last four characters of Bsp0 and Bsp1... (the file ext.)
    It's impairative that I also do the same thing with how many of these "a.WriteLine" statements I'll be needing. The number of Bsp0's (as well as "a.WriteLines") obviously need to be the same. I tried storing the a.WriteLine in a String, butt that didn't work!!
    So I'm kinda at a loss here! And could someone tell me if I can use the Val statement somehow, because someone suggested it and I though the Val statement stopped on the first non-numeric value, and the number is after Bsp, so WTH???

    Thanks in advance!
    If at first you DO succeed, don't look too astonished!
    -deadBird
    =================

  2. #2

    Thread Starter
    Member
    Join Date
    Mar 2000
    Location
    Mentor,Oh,US
    Posts
    33

    Angry

    Could some pro please review this for me!?
    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
  •  



Click Here to Expand Forum to Full Width